Linux
Sanjeev Tripurari.. Tips and Tricks
Monday, January 21, 2013
check how old is the file
Hi,
we often need to check, how old is the file from the current date
$ export FILE="the-big-file.log" ; echo `date +"%s"` - `stat -c %Z $FILE`|bc
this command gives us the difference in secs; how old is the file (the-big-file.log)
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)