日期:2014-05-16  浏览次数:20600 次

按时间删除文件---linux命令小记
创建一个标准文件 time_file
1. touch -t 01010000 time_file
然后删除不新于(! -newer) 这个文件的所有文件
2. find . ! -newer time_file | xargs rm
然后删除新于这个文件的所有文件
3.find .  -newer time_file | xargs rm
如果不能删除则加上强制:
如:
touch -t 12290000 new.txt
find . -newer new.txt | xargs rm -rf