Skip to content

last file created in directory

yvancouver edited this page Sep 11, 2013 · 4 revisions

from http://stackoverflow.com/questions/4561895/how-to-recursively-find-the-latest-modified-file-in-a-directory

find . -type f -exec stat -f "%m %N" {} ; | sort -n | tail -1 | cut -f2- -d" "

this need to be check

Clone this wiki locally