Logrotate - daily log files for a month
Chris Jones
jonesc at hep.phy.cam.ac.uk
Thu Aug 23 15:44:55 UTC 2007
M
> If you are using daily instead of weekly, then set rotate to 31 to
> keep the max number of days a month can have. Then add a monthly
> cron job to archive the month of logs if you want to keep them. By
> using 31 as the number of logs to keep, you insure you have at least
> a months worth of logs. If the month has less the 31 days, you will
> have 1 or more daily logs from last month left over.
you could probably the unwanted log files by having the cron job,
instead of blindly copying all 31 files, just copy the first X where X
was the number of days in the last month.
Chris
More information about the users
mailing list