# 每天晚上crond守护进程会运行在/etc/cron.daily目录中的任务列表
# blog https://www.cnblogs.com/clsn/p/8428257.html
yum -y install logrotate crontabs
软件包信息说明
[root@clsn6 ~]# rpm -ql logrotate
/etc/cron.daily/logrotate
/etc/logrotate.conf # 主配置文件
/etc/logrotate.d # 配置目录
[root@nginx1 logrotate.d]# cat nginx
/data/wwwlogs/*access.log {
su root root
daily
rotate 10
missingok
dateext
compress
notifempty
sharedscripts
postrotate
[ -e /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
endscript
}
# 测试
logrotate -v /etc/logrotate.conf