I have a log directory that my app writes into. It creates a log file like this:
2015-01-22-10-full-activity.log
2015-01-22-11-full-activity.log
2015-01-22-12-full-activity.log
2015-01-22-13-full-activity.log
I want to compress every file except the latest file and delete any file older than 3 days.
I thought logrotate would be able to do this for me, but I can't fathom it out and potentially it is because I'm naming my activity log with the time in its name.
Any ideas?