Blog

Recursively find the latest modified file

May 27, 2010
Category:Bash How To 

This will search the current directory for the most recently changed file and display the filename along with the modification time.

find . -printf "%CY-%Cm-%Cd %CH:%CM:%CS\t%p\n" | sort -nr | head -n 1


Comments