Reputation: 109
I am purging logs that are older than 30 days by using maxage
command
But I want to satisfy this criteria purge oldest logs if number of log files in total reaches 50
If anyone can help me with this would be helpful as I have no much knowledge on logrotation
Thanks
Upvotes: 0
Views: 123
Reputation: 4153
If your logfiles do not include date in the filename, adding rotate 50
will keep up to 50 copies.
rotate count
Log files are rotated count times before being removed
Upvotes: 1