Cronned newsyslog problem
paul at xciv.org
Thu May 2 12:38:29 BST 2002
alex dyas <adyas at twowaytv.co.uk> wrote:
> I have the following line in my root crontab :
> 0 0 * * * /usr/sbin/newsyslog -f /etc/newsyslog.conf > /dev/null 2>&1
> which works a treat, except that I keep getting mail that it has failed
> for some files :
> My problem is not that it can't see the files, but that I get the mail
> at all. I thought the 2>&1 would redirect standard error to /dev/null?
> This has always worked in the past with other crontab entries.
Try switching the redirects around, ie. "2>&1 >/dev/null", I've never
got around to investigating why that may be, but I'm sure there's a
technical explanation for it. I guess they are processed in order!
More information about the Ukfreebsd