UNIX Command Example: File Last Modification Information
Logon to UNIX command prompt then copy & past the bellow code to get the desired result:
echo `date +%s`-`date -r test.txt +%s` echo $(( `date +%s` - `date -r test.txt +%s` )) seconds echo $((( `date +%s` - `date -r test.txt +%s` )/60)) minutes echo $((( `date +%s` - `date -r test.txt +%s` )/3600)) hours
Here "date" is the base command to Display Date Time Information "date +%s" is to Date Time Information in seconds "ddate -r test.txt +%s" is to Display File Last Modification information information in seconds "test.txt" is the sample file If everything went well you should get some interesting result as follows:

No comments:
Post a Comment
leave your comments here..