logrotate is a program to rotates logs. This is run daily using cronjob
1 |
/etc/cron.daily/logrotate |
Logrotate config files are stored in
1 |
/etc/logrotate.d/ |
To rotate logs daily, add daily to the logrotate configuration. To keep logs for 5 days, add “rotate 5”.