老忘 find
#date
Sun Apr 1 11:22:33 CST 2012
#touch -d "20120401 11:22:33" today
#touch -d "20120331 11:22:33" yesterday
#touch -d "20120330 11:22:33" thedaybeforeyesterday
#find . -mtime 1 //n*24以前 至 (n+1)*24
./yesterday
#find . -mtime +1 //当前时间之前 n*24小时 这个时间点以前
./thedaybeforeyesterday
#find . -mtime -1 //当前时间往前(n*24)小时 至 当前时间
./today
#find . -mtime 0 //
./today
本文介绍了如何使用Linux下的find命令来查找指定时间内的文件。通过不同的mtime参数设置,可以精确地找到最近一天、两天或是更早之前的文件。这对于日常文件管理和系统维护非常有用。
1581

被折叠的 条评论
为什么被折叠?



