[PLUG] Controlling log rotation

David Fleck david.fleck at mchsi.com
Sat Jul 12 01:17:40 UTC 2014


On Fri, 2014-07-11 at 16:11 -0700, Rich Shepard wrote:
> #!/bin/sh
> /usr/sbin/logrotate /etc/logrotate.conf \
>   || { /usr/bin/logger -t logrotate "ALERT - exited abnormally." && false ; }
> 
>    What do I change so that all logs rotate daily? I don't need to retain
> mail or message logs for more than 4 days.

I'd suggest looking at the man page for logrotate.  I've never messed
with it, myself, but it appears to allow the degree of control you want.

-- 
David Fleck <david.fleck at mchsi.com>





More information about the PLUG mailing list