From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2560e24871751973 X-Google-Attributes: gidfee84,public From: "Andrew Ireland" Subject: Re: syslog.dated- changing log period? Date: 1997/12/19 Message-ID: <882528887.8470.0.nnrp-01.9e982017@news.demon.co.uk>#1/1 X-Deja-AN: 308540601 X-NNTP-Posting-Host: ascada.demon.co.uk [158.152.32.23] References: <882447391.7821.0.nnrp-03.9e982017@news.demon.co.uk> X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: ASCADA Limited Newsgroups: comp.unix.osf.osf1 Andrew Ireland wrote in message <882447391.7821.0.nnrp-03.9e982017@news.demon.co.uk>... >Is there any way to configure syslog to create a log directory which will >log files >and create new directories say once per month? Thanks to all who replied, here I am answering my own question. #!/bin/ksh month=`date +"%b"` echo "local1.info /var/adm/syslog/log.$month" > /etc/syslog.conf.monthly # # in /etc we have a copy of the original daily log, called syslog.conf.daily # cat the daily and the monthly file together to /etc/syslog.conf # cat /etc/syslog.conf.daily /etc/syslog.conf.monthly > /etc/syslog.conf # # it doesn't matter if we overwrite the old syslog.conf file as the syslogd # will have a note of all the file descriptors # If this is run in the root cron script at the beginning of the month _before_ the daily restart then when the syslog restarts on the new month it will create the new files.