clearLog.shapache
#!/bin/sh find /usr/local/apache/logs -mtime + 30 -name "*.log" -exec rm {} \;code
说明:crontab
chmod +x clearLog.shclass
crontab 启动定时任务定时任务