Logrotate 程序是一个Linux系统日志文件的管理工具
它可以根据日志文件的大小,也可以根据其天数来转储。
它还可以用于压缩日志文件,以及发送日志到指定的E-mail 。

Logrotate 的缺省配置文件是/etc/logrotate.conf


# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# 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
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}




Logrotate的运行脚本放在/etc/cron.daily/logrotate

/usr/sbin/logrotate /etc/logrotate.conf


可以看出,它并没有自己的守护进程
而是由crond来每天执行的