maillog 日志 切割 按日 分割
在 /etc/logrotate.d 目录中把syslog文件中的/var/log/maillog字段去除;
新建个maillog文件,在里面写入
/var/log/maillog {
daily
rotate 32
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/usr/sbin/logrotate -vf /etc/logrotate.d/maillog
测试通过 恩.cronolog也不错
页:
[1]