Tuesday 19 October 2010

Finding the most recently modified files with find

I recently needed to check that no files had been modified since I last made an archive of a certain directory. Here's a good one for geting a list of files by last modified date, newest at the top.

find . -type f -printf "%TY-%Tm-%Td %TT %pn\n" | sort -r | less