clearLog.sh
#!/bin/sh find /usr/local/apache/logs -mtime + 30 -name "*.log" -exec rm {} \;
说明:
chmod +x clearLog.sh
crontab 启动定时任务
linux 定期清除日志
原文:https://www.cnblogs.com/lizhang4/p/9283333.html