Compress files with logrotate

Istvan asked:

I have a directory structure which contains files already rotated (eg. there is a date part applied to the end). I would like to compress them and keep only 7 of each file type.

Is this achievable with logrotate?

My answer:


Why not just add the compress option to your logrotate config file? Reinventing the wheel sucks.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.