Neil Parker wrote:
Rob Hudson wrote,

How does one disable the output of certain cron jobs? I have some backup scripts running and other things and don't need to see all of that stuff in an email. Can I silently discard the output of those scripts that run?


The incantation I usually use is this:

     myscript.sh >/dev/null 2>&1

where "myscript.sh" is the script to be run by the cron job.  This goes in
the crontab file, in the "command to be run" field.

The ">/dev/null" discards the standard output, and "2>&1" says to send the
standard error to the same place as the standard output.

That's the one I'm used to seeing. Thanks for the explanation. &1 I guess can be thought of as a reference to where stdout is going.

Thanks,
Rob
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to