我有一个由文件和子文件夹(文件)组成的文件夹。我想显示 *.pth.tar
2018 年 2 月 23 日至 28 日之间写入的所有文件。这可能吗?
我需要执行什么命令来执行此操作?
谢谢
答案1
您找到文件修改的find
使用命令的-newermt
测试在一系列日期之间进行,例如
find path/to/folder/ -name '*.pth.tar' -newermt '23 Feb 2018' ! -newermt '01 Mar 2018'
是!
逻辑非运算符。来自man find
:
-newerXY reference Succeeds if timestamp X of the file being considered is newer than timestamp Y of the file reference. The letters X and Y can be any of the following letters: 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