Alexander Mills Alexander Mills - 1 year ago 130
Node.js Question

Redirect only stdout to /dev/null

I haven't yet mastered the weird shell stdio redirection thing yet.

I want to run npm install but redirect stdout so I don't have to see all of that. (I still want to capture stderr in the terminal, I just don't want to see stdout).

npm install -D suman 1> /dev/null

This doesn't seem to work.

What is the correct syntax (and possibly, why) to use to only redirect stdout to

Answer Source

npm install -D suman > /dev/null should do it. (It is standard for the redirect, only to redirect stdout)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download