定时清除,使用linux的crontab定时任务
* * * * * command
分 时 日 月 周 命令
清楚日志脚本
find /root/smsp/logs/ -mtime +25 -name "zk*.log*" -exec rm -rf {} \;
删除/root/smsp/logs目录下25天前修改过的文件,文件格式zk*.log*
每天8点执行清楚日志的脚本
0 8 * * * sh /root/sms/logDel.sh
扫描二维码关注公众号,回复:
947574 查看本文章