天天看點

批量建立日志檔案

按照下圖建立日志檔案:

for n in `seq 14`;
do
date -s "2016/03/$n";
touch access_www_$(date +%F).log;
done
~                
[root@centos heqiuyu]# find /root/heqiuyu -type f -mtime +7 | xargs rm -f
[root@centos heqiuyu]# find /root/heqiuyu -type f -mtime +7 -exec rm -f {} \;
[root@centos heqiuyu]# rm -f `find /root/heqiuyu -type f -mtime +7`
           

繼續閱讀