Looking for generic way how to sort a random list of files by its modification time, so something like:
./make_list_of_files | some_sorter_by_mtime
my currect solution is (here the make_list_of_files is the find command):
find / -type f -print |\
perl -nle 'push @in,$_;END {@out = sort{ (stat($a))[9] <=> (stat($b))[9] } @in; $,="\n";print @out}'
exists some simpler solution (e.g. without perl)?
Your
some_sorter_by_mtimeshould be for example:the idea behind is:
so,