Skip to content

Instantly share code, notes, and snippets.

@themiurgo
Created June 29, 2012 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save themiurgo/3018767 to your computer and use it in GitHub Desktop.
Save themiurgo/3018767 to your computer and use it in GitHub Desktop.
Seconds elapsed since last update of a file
# FILL FILENAME
# Return the seconds from last modification of a file, among a list of files
file=$(ls FILENAME -hant --time-style +%s | head -n1 | awk '{print $6}' ) ; now=$(date +%s); echo $((now-file))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment