1

[HELP] what does "2>&1" do in crontab?

view story
linux-howto

http://www.unix.com – Hi Experts, I would like to know, what does "2>&1" do in crontab? example: * * * * * /export/user/home/test.sh >> /export/user/home/logtest.log 2>&1 My colleague told me the commabd 2>&1 mean to prevent crontab sending an email (sendmail on /var/mail/root) when the script failed. So, if error occur when the crontab script failed, the email will dump to logtest.log not on /var/mail/root. Is it true? Why system always sending email if crontab script failed? and with adding command 2>&1 can solve the problem? (HowTos)