-
-
Save waffle2k/5cc1fe9f05c7d01001a7 to your computer and use it in GitHub Desktop.
Display the age of a provided file in seconds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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