Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grep time?!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need to grep if some file has been in a directory for more than one hour, and then put that in a log file. How do i grep time? Not nessecary with the grep command...i know that...but i need to fix it anyway
 

Try this with awk, because awk recognizes fields of record.

You can redirect output of ls command to file every hour and compare with awk two files or last hour file and output of ls command of current state.

I hope this idea helps.

KP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top