查找当前目录下.phtml文件中,最近30分钟内修改过的文件。
view sourceprint?
1 find . -name '*.phtml' -type f -mmin -30
查找当前目录下.phtml文件中,最近30分钟内修改过的文件,的详细情况。
view sourceprint?
1 find . -name '*.phtml' -type f -mmin -30 -ls
查找当前目录下,最近1天内修改过的常规文件。
view sourceprint?
1 find . -type f -mtime -1
查找当前目录下,最近1天前(2天内)修改过的常规文件。
view sourceprint?
1 find . -type f -mtime 1
查找当前目录下,最近1天前修改过的常规文件。
view sourceprint?
1 find . -type f -mtime +1
注意这里的:-1, 1, +1的区别
和时间有关的find参数:
view sourceprint?01 -mmin n
02 Files data was last modified n minutes ago.
03
04 -mtime n
05 Files data was last modified n*24 hours ago. See the comments for -atime to understand how rounding affects the interpretation of
06 file modification times.
07
08 -newer file
09 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 modifi-
10 cation time of the file it points to is always used.
和文件类型有关的find参数:
view sourceprint?
1 -type c File is of type c:
2 b block (buffered) special
3 c character (unbuffered) special
4 d directory
5 p named pipe (FIFO)
6 f regular file
7 l symbolic link; this is never true if the -L option or the -follow option is in effect, unless the symbolic link is broken.
8 If you want to search for symbolic links when -L is in effect, use -xtype.
9 s socket