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)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment