pydelion.com

Linux. how to find the most recent file in a folder

find $DIR -type f -printf "%T@ %p\n" | sort -n | cut -d' ' -f 2- | tail -n 1

Found at StackOverflow.

Exit mobile version