Logrotate - daily log files for a month
Mikkel L. Ellertson
mikkel at infinity-ltd.com
Thu Aug 23 14:58:02 UTC 2007
John Horne wrote:
> Hello,
>
> Using Fedora 7, I am trying to see how we can rotate some log files each
> day, but keep a month's worth of files.
>
> Logrotate can rotate the files daily, and I can specify something like:
>
> daily
> start 1
> rotate 30
>
> But this does not account for month's of 31 days, or February with 28/29
> days. Likewise if I set 'rotate 31' then this is not going to work on
> those months of just 30 days.
>
> Does anyone have any ideas about this?
>
>
> Thanks,
>
> John.
>
You can control how many old log files are kept by changing "rotate
4" to how many weeks of backlogs you want to keep, This is in
/etc/logrotate.conf. You can control individual logs by editing the
corresponding file in /etc/logrotate.d and adding/changing the
rotate line. You can find more information by running "man logrotate".
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20070823/e63eb2de/attachment-0001.sig>
More information about the fedora-list
mailing list