查找当前目录下.phtml文件中,最近30分钟内修改过的文件。

find . -name '*.phtml' -type f -mmin -30

查找当前目录下.phtml文件中,最近30分钟内修改过的文件,的详细情况。

find . -name '*.phtml' -type f -mmin -30 -ls

查找当前目录下,最近1天内修改过的常规文件。

find . -type f -mtime -1

查找当前目录下,最近1天前(2天内)修改过的常规文件。

find . -type f -mtime 1

查找当前目录下,最近1天前修改过的常规文件。

find . -type f -mtime +1

注意这里的:-1, 1, +1的区别

和时间有关的find参数:

-mmin n
       Files data was last modified n minutes ago.

-mtime n
       Files data was last modified n*24 hours ago.  See the comments for -atime to understand how rounding affects the interpretation of
       file modification times.

-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 modifi-
       cation time of the file it points to is always used.

和文件类型有关的find参数:

 -type c  File is of type c:

 b      block (buffered) special

 c      character (unbuffered) special

 d      directory

 p      named pipe (FIFO)

 f      regular file

 l      symbolic  link;  this is never true if the -L option or the -follow option is in effect, unless the symbolic link is broken.
        If you want to search for symbolic links when -L is in effect, use -xtype.

 s      socket