我想列出我的 Linux 服务器中所有早于 2014 年 12 月 31 日的文件

Sau*_*abh 3 find timestamps files

我想列出 2014 年 12 月 31 日之前的目录和子目录中的所有 Linux 文件。请帮我解决这个问题。

小智 17

find . -type f ! -newermt "31 Dec 2014"

查找(1):

-newerXY reference
          Compares the timestamp of the current file with reference.   The
          reference  argument  is  normally the name of a file (and one of
          its timestamps is used for the comparison) but it may also be  a
          string  describing  an  absolute time.  X and Y are placeholders
          for other letters, and these letters select which time belonging
          to how reference is used for the comparison.

          a   The access time of the file reference
          B   The birth time of the file reference
          c   The inode status change time of reference
          m   The modification time of the file reference
          t   reference is interpreted directly as a time
Run Code Online (Sandbox Code Playgroud)