Is it possible to get logrotate to keep the last week of logs in the current file?
for example :
errors.log contains 30 days of logs
after log rotate executes , I would have :
errors.log with the last 7 days of log
and
errors.log.1.gz compressed with the 23 other days.
Is that possible?
followed by a postrotate script doing something like (untested):
Cheers.