Can anyone show me how to write a logrotate rule that will rotate on
either size or age?

I use some very simple scripting for yrs but don't really see how to
rotate on more than one condition.

I'd like to rotate a certain log weekly or over 7000k and keep no more
than 12 rotations for whatever reason.

/var/log/debug.log {
   create 0600 reader wheel
    weekly || size=7000k
    rotate 12
    postrotate
      /etc/init.d/rsyslog reload > /dev/null 2>&1 || true
    endscript
}

Is clearly NOT the right way to go.

Any know how to do it?


Reply via email to