标签:
#!/bin/bash find /usr/local/nginx/logs/ -mtime +15 -type f -name *.log | xargs rm -f
脚本名字autodellog.sh
设置定时器(每天凌晨一点执行)
[root@localhost ~]# crontab -e 00 01 * * * /bin/bash /root/shell/autodellogs.sh [root@localhost ~]# service crond restart
标签:
原文地址:http://www.cnblogs.com/jdhu/p/4418630.html