Skip to content

Instantly share code, notes, and snippets.

@raggleton
Created December 11, 2013 10:35
Show Gist options
  • Save raggleton/7908259 to your computer and use it in GitHub Desktop.
Save raggleton/7908259 to your computer and use it in GitHub Desktop.
Prints filename of most recently modified version of example_*.txt. Taken from http://stackoverflow.com/questions/4561895/how-to-recursively-find-the-latest-modified-file-in-a-directory
find . -type f -name "example-*.txt" -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment