cmd

Nix all output

$ 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.

1 Comment

  • On 12.02.08 commandliners » Quiet grep said:

    […] 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. […]

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*Required Fields