You never gain weight from a donut hole

Monday, July 31, 2006

The meaning of >> /dev/null 2>&1

When you end your command with ">> /dev/null 2>&1", this means to send any standard output to /dev/null (the linux trash can) and to redirect standard error (2) to the same place as the standard output (1). Basically it runs the command without any output to a terminal etc.

This is mostly helpful in scripts, especially those running in the crontab, were you don't want any output sent to screen or to the /var/mail or the cron record.

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home