1.vim delLog.sh
#!/bin/sh
#删除3天前的log
find /var/www/Logs/ -mtime +3 -name "*.log" -exec rm -rf {} \;
2.crontab -e
#每天0点1分执行
1 0 * * * sh /home/user/delLog.sh
1.vim delLog.sh
#!/bin/sh
#删除3天前的log
find /var/www/Logs/ -mtime +3 -name "*.log" -exec rm -rf {} \;
2.crontab -e
#每天0点1分执行
1 0 * * * sh /home/user/delLog.sh