1. logrotate中的tomcat配置文件 cat /etc/logrotate.d/tomcat #配置文件如下 /web/soft/tomcat/logs/catalina.out { copytruncate daily rotate 7 nocompress missingok ifempty dateext dateformat -%Y-%m-%d } 2. 手动测试 logrotate --force /etc/logrotate.d/tomcat 3. 查看效果