Recursively find the n latest modified files in a directory
Posted by Kelvin on 18 May 2011 | Tagged as: programming, Ubuntu
Here's how to find the latest modified files in a directory. Particularly useful when you've made some changes and can't remember what! find . -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" " Replace tail -1 with tail -20 to list the 20 most recent files for example. […]