Skip to content

Instantly share code, notes, and snippets.

@waffle2k
Created June 3, 2014 19:37
Show Gist options
  • Save waffle2k/5cc1fe9f05c7d01001a7 to your computer and use it in GitHub Desktop.
Save waffle2k/5cc1fe9f05c7d01001a7 to your computer and use it in GitHub Desktop.
Display the age of a provided file in seconds
#!/bin/bash
#
# Display age of file in seconds
echo $(($(date +%s)-$(stat -c %Y $1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment