linux递归查询目录文件
How to sort all the files in a directory and subdirectories recursively by modification time on Linux?
如何在Linux上按修改时间对目录和子目录中的所有文件进行递归排序?
You can make use of find
(GNU find
, or plus stat
), sort
and sed
together to achieve recursively sort files by modification time:
您可以使用find
(GNU find
或plus stat
), sort
它们进行sort
和sed
在一起,以按修改时间来递归地对文件进行排序:
find . -type f -printf '%T@ %pn'
| sort