$ cat /var/mail/* >/dev/null 2>&1
The first redirect sends stdout to /dev/null, the second one sends stderr to stdout, thus making all the output disappear. Useful in cron jobs if you want no mail sent.
$ cat /var/mail/* >/dev/null 2>&1
The first redirect sends stdout to /dev/null, the second one sends stderr to stdout, thus making all the output disappear. Useful in cron jobs if you want no mail sent.
Add your comment below, or trackback from your own site.
Be nice. Keep it clean. Stay on topic. No spam.
You can use these tags:
[...] versions of grep is desired… One should redirect all output to /dev/null, but we have already spoken about this, and it is likely that you do not need that compatibility in your new home-made scripts. [...]