5

Cron emails output even when redirecting to /dev/null 2>&1

view full story
linux-howto

http://serverfault.com – The code below should redirect all output to /dev/null however root still receives an email with output from the first command (/usr/bin/svnadmin). Why? #!/bin/sh # Dump repo and upload via tarsnap /usr/bin/svnadmin dump /srv/repos/www | gzip > /srv/repos/backup/www-repo-`date --iso-8601`.gz > /dev/null 2>&1 /usr/local/bin/tarsnap -c -f www-repo-`date --iso-8601` /srv/repos/backup/www-repo-`date --iso-8601`.gz > /dev/null 2>&1 (HowTos)