USM Bish <[EMAIL PROTECTED]> writes: > With time, the size of /var/log/messages keeps on growing, > till it really becomes really huge, with information no > longer needed. Since syslogd is constantly monitoring and writing on to > it, I have never attempted initialising a fresh /var/log/messages on a > running machine. > > Is there a recommended way wherein I keep the log for the > last seven days only, with some process at boot-up or cron ?
Seems like logrotate will fit your bill. Package: logrotate Priority: important Section: admin Conffiles: /etc/logrotate.conf 70593fe48cb39133328b42a560b5a8cf Description: Log rotation utility The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files. Logrotate allows for the automatic rotation compression, removal and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size. Normally, logrotate runs as a daily cron job. -- Olaf Meeuwissen Epson Kowa Corporation, Research and Development