Two days ago, tomcat running on the server generated a log file of 12 GB, resulting in insufficient folder space, tomcat is suspended, found online, you can regularly clean all log files. /opt/tomcat/logs/catalina. out is obtained by running the command pwd in the file path,/opt/tomcat/logs/catalina. out {rotate 14 www.2cto.com daily copytruncate compress reset empty missingok} Where: rotate 7 indicates that the 7-day backup file daily is retained, and copytruncate indicates that the log file is copied first, then, compress is cleared to compress the backup file missingok. If the log file cannot be found, the compress file is not OK. Reset empty indicates that if the log file is empty, rotate is not performed. For example: http://service.ap-southeast-1.maxcompute.aliyun-inc.com/home/apache-tomcat-6.0.18/logs/catalina. out {rotate 7 daily copytruncate nocompress restart empty missingok} and then run the command:/usr/sbin/logrotate/etc/logrotate. conf to synchronize the execution by bossshit