#日志轮替默认在Cron里设置
/etc/cron.daily/logrotate
#日志文件依赖配置文件
/etc/logrotate.conf
#配置文件
weekly #默认每周进行一次日志清理
rotate 10 #保留的日志文件
# create new (empty) log files after rotating old ones
create #创建一个新的来存储
# uncomment this if you want your log files compressed
#compress #是否需要压缩
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
转载请注明出处:脚本学堂 http://www.jb200.com/article/5655.com