linux的日志切割可以查到很多文章,配置文件的地方大概是:
/etc/logrotate.conf
/etc/logrotate.d/
从结果看,日志都在6:25分进行了切割:
如果想更改6:25这个时间,必须改一个文件 vi /etc/crontab:
root@moneyslow.com:~# cat /etc/crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
1 * * * * root cd / && run-parts --report /etc/cron.hourly
59 23 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
1 1 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
2 1 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
以上我把时间改为了23点59分