Cronned newsyslog problem

alex dyas adyas at
Thu May 2 12:16:28 BST 2002

Hi all,

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 :

 From root Thu May  2 00:00:21 2002
Date: Thu, 2 May 2002 00:00:11 +0100 (BST)
From: root (Cron Daemon)
To: root
Subject: Cron <root at twc_netsaint> newsyslog
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>

gzip: /var/log/maillog.0: No such file or directory
/var/log/daily.log.0: No such file or directory

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.


-= alex dyas - webmaster - twowaytv - uk =-

More information about the Ukfreebsd mailing list