![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| rsync - date/time stamp | prvnrk | UNIX for Advanced & Expert Users | 4 | 04-11-2008 10:58 AM |
| Date/Time Stamp | JimmyFlip | UNIX for Dummies Questions & Answers | 0 | 11-14-2006 08:49 PM |
| Inserting Date&Time Stamp In Existing Log File | shephardfamily | UNIX for Dummies Questions & Answers | 3 | 02-24-2006 01:01 AM |
| Insert Time and Date Stamp | aajmani | Shell Programming and Scripting | 1 | 10-13-2005 12:15 PM |
| File date and time stamp | Xenon | UNIX for Dummies Questions & Answers | 1 | 10-09-2001 12:58 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Date Time Stamp
I'm trying to write a script that checks the DTS of a file the compares it to the current time. If greater that 60 mins has gone by and the file has not been written to alert.
So far I have the time pulled from the file but I dont know how to compare the times against a 60 min difference. #!/bin/ksh # Check to see if the Control File has been updated hourly stime=`date +%H:%M` CHECK() { ls -al | grep filename |awk '{ print $8 }' > $ntime } |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Did you try to use find command with different options like -
Quote:
|
|
#3
|
||||
|
||||
|
Time in seconds since a file was last modified...
Code:
perl -e '@q=stat($ARGV[0]); print time-$q[9]' file1 |
||||
| Google The UNIX and Linux Forums |