
例如,2014年1月1日:
touch -t 201401010000 /tmp/2014-Jan-01-0000find /path -type f ! -newer /tmp/2014-Jan-01-0000 | xargs rm -rf
之所以有效,是因为我们正在使用
find一个
-newer开关。
来自
man find:
-newer file File was modified more recently than file. If file is a symbolic link and the -H option or the -L option is in effect, the modification time of the file it points to is always used.
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)