Re: Logrotate - daily log files for a month

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

 



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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux