Shell Scripting – Sort Files Recursively by Last Modified Date

findscriptingshellsort

Sort the files in the directory recursively based on last modified date

I have modified a lot of files in my directory want to know what are those files by sorting them by the last modified date and in that I want some of the extensions to be excluded

in the svn directory I have a lot of .svn files too which I don't want to show in the sort

Best Answer

find -printf "%TY-%Tm-%Td %TT %p\n" | sort -n

will give you something like

2014-03-31 04:10:54.8596422640 ./foo
2014-04-01 01:02:11.9635521720 ./bar

Related Question