Unless you use your logs in some script you can compress the files in /var/log very easily by adding the compress option to the /etc/logrotate.conf file. The dateext option will also add the date on which the log was compressed to the filename.
You can reduce the number of copies of log files by changing the rotation frequency. In this case 7 days are being kept.Code:compress dateext
To activate the changes immediately run the commandCode:rotate 7 daily
Code:logrotate -f /etc/logrotate.conf


Reply With Quote


Bookmarks