代码示例:

find /opt/soft/log/ -mtime +30 -name "*.log" -exec rm -rf {} \;

删除30天前的日志,至于你想删其他的,自己修改。方法来自:http://www.cnblogs.com/peida/archi[……]

Read more