[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] messages and maillog



Ed wrote:
Hiya,

how can i make the messages file clear itself every couple of days? i for
some reason keep on having to delete them cosw they grow so large ... any
help is recieved with open arms.

Ed

_____________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To subscribe/unsubscribe, or to SEARCH THE ARCHIVES, go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users



Hi,

This process is automatic on all cobalts i know, there is a cron.daily task which runs "logrotater", which in its turn checks /etc/logrotate.d directory for what and how to rotate.

anyway, if you want to do that manual, you can:

cd /etc/cron/.daily

now create a script:  pico myrotate.sh
which contains something like;

cd /var/log
mv messages.6 messages.7
mv messages.5 messages.6
mv messages.4 messages.5
.
.
mv messages messages.1
touch messages

exit, and:   chmod +x myrotate.sh

That will give you 7 days of backlog, and move the logs on every day.

Bob.