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 > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to find files older than 2 hours pt14 AIX 3 03-05-2008 12:31 PM
Find files on minutes basis er_aparna Shell Programming and Scripting 3 07-16-2006 09:57 PM
Find files older than 20 days & not use find halo98 Shell Programming and Scripting 2 05-18-2006 02:19 PM
find files onder than 15 minutes sveera UNIX for Advanced & Expert Users 11 08-11-2005 03:48 PM
files older than 15 minutes sveera Shell Programming and Scripting 0 08-05-2005 02:05 PM

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

Join Date: Sep 2001
Posts: 20
only find files older than x minutes old

I am looking for a way to show files that have been created within a certain period (say anything older than 10 minutes or so). Is there a command/series of commands I can do this with? As an example, I have the following in a directory:

-rw-r--r-- 1 owner group 70175 May 16 09:10 ICO_CS11_787113367_50467914_1_CS-11.pdf
-rw-r--r-- 1 owner group 70719 May 16 09:24 ICO_CS11_787113367_50467945_1_CS-11.pdf
-rw-r--r-- 1 owner group 70617 May 16 09:30 ICO_CS11_787113367_50467971_1_CS-11.pdf
-rw-r--r-- 1 owner group 70860 May 16 09:30 ICO_CS11_787113367_50467974_1_CS-11.pdf
-rw-r--r-- 1 owner group 70342 May 16 09:31 ICO_CS11_787113367_50467980_1_CS-11.pdf
-rw-r--r-- 1 owner group 70208 May 16 09:36 ICO_CS11_787113367_50468000_1_CS-11.pdf

Pretend it's now May 16 09:40 and I do not want to see the last three files as those are within the last 10 minutes. I only want to see:

-rw-r--r-- 1 owner group 70175 May 16 09:10 ICO_CS11_787113367_50467914_1_CS-11.pdf
-rw-r--r-- 1 owner group 70719 May 16 09:24 ICO_CS11_787113367_50467945_1_CS-11.pdf

Any idea on how this can be done? I am on AIX and writing shell scripts.
  #2 (permalink)  
Old 05-18-2006
ranj@chn ranj@chn is offline Forum Advisor  
Playing with Ubuntu Now!
  
 

Join Date: Oct 2005
Location: Chennai
Posts: 365
see if it helps

May be you could create a file with a timestamp you want and use find's 'newer' option to get the files. Search the site for numerous examples.
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:45 PM.


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