log="/tmp/back.log"
cleardate=date "+%Y%m%d%H%M%S"
for i in find /software/* -name "catalina.out" -o -name "*.log" ! -user root
;do cat /dev/null>$i;done;
echo "清理日志定时任务记录: $cleardate" >>$log
原文地址:http://blog.51cto.com/12250761/2307685
时间: 2024-10-29 08:20:52