我怎样才能sortingfind的结果? 我想按date创buildasc?
find /docs -type f | sort
按文件名sorting,不build立date。 谢谢。
AFAIK,Linux不logging创build时间,所以简短的答案是你不能。
对于修改时间,试试这个:
$ find /docs -type f -printf '%T@ %p\n' | sort -k1 -n
要么:
$ find /docs -type f -print0 | xargs -0 stat -c "%y %n" | sort