The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
unix command/s to find files older than 2 hours in a directory Presanna Shell Programming and Scripting 6 11-20-2007 09:22 AM
Deleting Files Older than 24 hours mazhar803 SUN Solaris 7 09-27-2007 07:30 AM
removing files after 6 hours or older gthokala Shell Programming and Scripting 3 08-22-2005 10:59 PM
Finding only those files older than 2 hours mh53j_fe UNIX for Dummies Questions & Answers 2 07-01-2005 09:33 AM
Finding files older than 2 hours ianf Shell Programming and Scripting 1 05-27-2002 10:51 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-05-2008
pt14 pt14 is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 28
how to find files older than 2 hours

I need help to find files in a directory that are older than 2 hours.
Any help would be great.
  #2 (permalink)  
Old 03-05-2008
lbreddy lbreddy is offline
Registered User
  
 

Join Date: Mar 2008
Location: bangalore
Posts: 22
Unhappy to find out the file

Quote:
Originally Posted by pt14 View Post
I need help to find files in a directory that are older than 2 hours.
Any help would be great.
Hi this is babu,

I am giving a command follwing,

touch -t [[CC]YY]MMDDhhmm[.SS] somefile
find . ! -newer somefile -print

This command will be displayed the files at the perticular time stamp.
bye,
babu:
  #3 (permalink)  
Old 03-05-2008
itik itik is offline
Registered User
  
 

Join Date: Oct 2007
Location: Toronto, Ontario
Posts: 352
I have a common script for finding it in two days but not two hours:

find /users -name '*.tmp' -mtime +2

Try to find something on the -mtime maybe you could change this param to be hour not day.
  #4 (permalink)  
Old 03-05-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Wink Whole bunch of useful info here

Take a look at the FAQ's.
My thought is in using perl, and then seeing if the last modification time is within 2 hours of now.

http://http://www.unix.com/answers-f...rithmetic.html
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0