Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.