记住： logrotate 运行时，是有一个自己的状态记录文件的。( /var/lib/logrotate.status ) 它会在这个文件中记录好每个文件的最早时间。然后每次运行时把目标文件跟自己的表做对比。如果发现目标文件的日期超过了这个表的日期，比如一个星期，那么 logrotate 才会对它分卷。 ( keep in mind that logrotate has its own status file which is used to remember when the target file is created and determine if the target file should be rotated. )

典型命令：

$logrotate -v /etc/logrotate.d/nginx (如果你使用了 -vd 那么就仅仅是一个dry-run 预演，不会对 /var/lib/logrotate.status 生效 ) ( also remember that don't use the debug mode since it's just lead to a dry-run result and won't take effect on /var/lib/logrotate.status file )