17
3
I want to find files in subdirectories sorted by timestamp (of creation), with most recent first.
I have looked at the man page but it seems to only seems to let you filter by timestamp rather than sort by timestamp.
What options can I pass to find
to accomplish this?
Alternately, how can I combine it with another tool, like sort
to sort by timestamp?
@merlin2011, please review your selection of answers here -- the presently-selected answer is buggy (will generate outputs which are not actually correctly sorted) when there are more files found by
find
than can be passed to a single instance ofls
. – Charles Duffy – 2018-02-28T02:45:42.520@CharlesDuffy, Thanks for the note! I've updated the accepted answers. – merlin2011 – 2018-02-28T03:30:01.977
1You can't make
find
do anything in a particular sorted order, beyond choosing between a depth-first search and a breadth-first search. – Jonathan Leffler – 2013-06-18T02:34:45.333