l有一个同时包含文件和(文件的)子文件夹的文件夹。我想显示*.pth.tar
2018年2月23日至28日之间编写的所有文件。这可能吗?
我需要执行什么命令?
谢谢
您可以使用命令的测试找到在日期范围之间修改的文件,例如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
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句