为什么我们要在配置文件中设置每日/每周/每月选项,如果我们可以在 cron 中设置(实际上是这样做的)?这个选项有什么意义?
例如:我设置为每天(每天)执行“logrotate -f /etc/logrotate.d/app”。但在配置文件 (/etc/logrotate.d/app) 中,我将每周设置:
/home/dirnov/www/letsee/logs/*.log {
monthly
missingok
rotate 4
compress
notifempty
}
Run Code Online (Sandbox Code Playgroud)
而且我看到没有“每月”的意思,因为cron会“每天”做。