There are many programs out there that manage log file rotation by themselves. Many of them however only rotate the log and never delete them, and assume that is just part of the sysadmin's job and he/she will backup or delete as necessary.
My question is can I use Logrotate to only delete old logfiles? Something like
/some/log/path/*{
maxage 90
}
I realize this can be easily accomplished with Cron and other ways, but my question is specifically using Logrotate. Are there any downsides to doing this?
Thanks!
Best Answer
The manpage says:
(Emphasis added.) Going by this, unless
logrotate
is responsible for rotating the log, thenmaxage
will be ignored.I thought about maybe configuring logrotate to perform rotate operation that effectively does nothing but I'm not seeing anything among the configuration options that would easily allow that.