Skip to content

Instantly share code, notes, and snippets.

@hxtree
Created February 5, 2021 21:48
Show Gist options
  • Save hxtree/3df469a0ee111ba65275d07a755d2ff2 to your computer and use it in GitHub Desktop.
Save hxtree/3df469a0ee111ba65275d07a755d2ff2 to your computer and use it in GitHub Desktop.
Linux Find Last Modified Files

Find files in a directory most recently modified

find $1 -type f -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- | head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment