Periodically delete the date when the Pagoda Panel website monitoring report is generated

Regularly delete the date when the website monitoring report on the pagoda panel is generated. With the increase of website traffic, the daily website monitoring report generation date will vary from dozens of M to hundreds of M. As time goes on, the server space will be insufficient, so it needs to be deleted regularly.

Take deleting the log 3 days ago as an example, enter the pagoda panel, schedule tasks, add scheduled tasks, shell scripts, and execute the cycle every day

The script content is as follows,

find /www/server/total/logs/m.kylunwen.com/ -mtime +3 -name "*.log" -exec rm -rf {} \;

find /www/server/total/logs/m.kylunwen.com/ -mtime +3 -name "*.log" -exec rm -rf {} \;

find /www/server/total/logs/kylunwen.com/ -mtime +3 -name "*.log" -exec rm -rf {} \;

3 is 3 days ago, /www/server/total/logs/kylunwen.com/ path is the folder where the log is located, *.log is the file type,

Finally, add a task

Guess you like

Origin blog.csdn.net/qq_41608099/article/details/106372712