Category:Logrotate Configuration Files
The logrotate application can perform log rotation automatically. The application is available on most distributions through package managers.
Generally, distributions configure logrotate to include all the configuration fragments in a given directory, often
/etc/logrotate.d. Therefore, to configure rotation of an application's log files, you simply add a new file to the directory with the desired configuration for rotation of the application's log files.
Most users will find the
/etc/logrotate.d folder contains some log rotation scripts already. Place the chosen configuration file in the
/etc/logrotate.d with the same permissions as the other files. You may choose any desired file names.
To manually run logrotate to test your configuration you can use
logrotate -f -s /var/lib/logrotate.status /etc/logrotate.d/mythtv
Make sure to substitute an appropriate location for your status and configuration files.
For more information on logrotate and logrotate configuration options see:
man 8 logrotate