linux 中查找过去一段时间内被修改过的文件

 

001、

[root@pc1 test]# ls
a.txt  b.txt  c.txt
[root@pc1 test]# ll -h             ## 测试文件
total 4.0K
-rw-r--r--. 1 root root  0 Oct 28 16:36 a.txt
-rw-r--r--. 1 root root 21 Oct 28 16:37 b.txt
-rw-r--r--. 1 root root  0 Oct 28 16:36 c.txt
[root@pc1 test]# find ./ -mmin -1           ## 过去一分钟内被修改过的文件
[root@pc1 test]# find ./ -mmin -3
[root@pc1 test]# find ./ -mmin -4           ## 过去4分钟内被修改过的文件
./b.txt
[root@pc1 test]# find ./ -mmin -10
./
./a.txt
./b.txt
./c.txt
[root@pc1 test]# find ./ -mtime -1          ## 过去一天内被修改过的文件
./
./a.txt
./b.txt
./c.txt

 

posted @ 2022-10-28 16:43  小鲨鱼2018  阅读(76)  评论(0编辑  收藏  举报