Cronned newsyslog problem
alex dyas
adyas at twowaytv.co.uk
Thu May 2 13:04:03 BST 2002
Paul Civati wrote:
> 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!
This makes sense, ie redirect standard error to standard out, then to
/dev/null.
I have an idea I've already tried this, but I'll give it another go.
Thanks,
alex..
--
-= alex dyas - webmaster - twowaytv - uk =-
More information about the Ukfreebsd
mailing list