Justin Asked: 2011-11-29 01:55:33 +0800 CST2011-11-29 01:55:33 +0800 CST 2011-11-29 01:55:33 +0800 CST Find, and sort results by date created 772 How can I sort the results of find? I want to sort by date created asc? find /docs -type f | sort Sorts by filename not date created. Thanks. linux find sort 1 Answers Voted Best Answer quanta 2011-11-29T02:34:01+08:002011-11-29T02:34:01+08:00 AFAIK, Linux doesn't record the creation time, so the short answer is you cannot. For the modification time, try this: $ find /docs -type f -printf '%T@ %p\n' | sort -k1 -n or: $ find /docs -type f -print0 | xargs -0 stat -c "%y %n" | sort
AFAIK, Linux doesn't record the creation time, so the short answer is you cannot.
For the modification time, try this:
or: