Hourly rotation of files using logrotate? [closed] Hourly rotation of files using logrotate? [closed] linux linux

Hourly rotation of files using logrotate? [closed]


The manpage of logrotate.conf contains an important advice for the hourly option:

Log files are rotated every hour. Note that usually logrotate is configured to be run by cron daily. You have to change this configuration and run logrotate hourly to be able to really rotate logs hourly.

As pointed out by yellow1pl the solution is to copy the file /etc/cron.daily/logrotate into the /etc/cron.hourly/ directory. This works at least for Debian and possibly some Debian derivates.


There is /etc/cron.daily/logrotate script for daily logrotates. However there is no such script by default in /etc/cron.hourly/ directory. Copy this script and it should work fine.