Given a directory i’m looking for a bash one-liner to get a recursive list of all files with their size and modified time tab separated for easy parsing. Something like:
cows/betsy 145700 2011-03-02 08:27
horses/silver 109895 2011-06-04 17:43
You can use
stat(1)to get the information you want, if you don’t want the fullls -loutput, and you can usefind(1)to get a recursive directory listing. Combining them into one line, you could do this:If you want to make the output more parseable, you can use
%minstead of%Smto get the last modified time as atime_tinstead of as a human-readable date.