clearLog.shapache
#!/bin/sh find /usr/local/apache/logs -mtime + 30 -name "*.log" -exec rm {} \;code
說明:crontab
chmod +x clearLog.shclass
crontab 啓動定時任務定時任務