![我想列出 Linux 服务器中早于 2014 年 12 月 31 日的所有文件](https://linux22.com/image/79874/%E6%88%91%E6%83%B3%E5%88%97%E5%87%BA%20Linux%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%AD%E6%97%A9%E4%BA%8E%202014%20%E5%B9%B4%2012%20%E6%9C%88%2031%20%E6%97%A5%E7%9A%84%E6%89%80%E6%9C%89%E6%96%87%E4%BB%B6.png)
我想列出目录和子目录中早于 2014 年 12 月 31 日的所有 Linux 文件。请帮我解决这个问题。
答案1
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