The UNIX and Linux Forums  


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
Need help on bash "find" utility sonyd8 Shell Programming and Scripting 2 03-31-2008 06:38 PM
options in FIND utility amarnath Shell Programming and Scripting 8 07-15-2006 07:15 AM
can't find my NEDIT utility after shell change bobk544 UNIX for Dummies Questions & Answers 2 03-16-2006 11:15 AM
Compound command with 'find' utility? deckard Shell Programming and Scripting 6 10-05-2005 05:27 PM
Threaded 'find' utility mariuca High Level Programming 1 10-27-2004 06:57 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 09-19-2007
marlonus999's Avatar
marlonus999 marlonus999 is offline
Registered User
  
 

Join Date: Dec 2006
Location: Manila
Posts: 27
Question on Find Utility

Hi Guys,

Do you know how can I find files with modificatioin time less than 30 MINUTES using the find utility?

Or if u have any other mechanism to find it using script, I'll appreciate it.

Thanks!
  #2 (permalink)  
Old 09-19-2007
ghostdog74 ghostdog74 is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2006
Posts: 2,556
man find, and then check the -cmin option, if any.
  #3 (permalink)  
Old 09-19-2007
marlonus999's Avatar
marlonus999 marlonus999 is offline
Registered User
  
 

Join Date: Dec 2006
Location: Manila
Posts: 27
Hey ghostdog74,

I'm using AIX 5.x and HP-UX 11.11.x and there is no -cmin option:

poppy@zooberi /home/poppy> find . -type f -cmin +30
find: 0652-017 -cmin is not a valid option.

Any more ideas???
  #4 (permalink)  
Old 09-19-2007
prvnrk prvnrk is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 138
if the present date and time is 19th sep 2007 and 11:45 then

touch -t 200709191115 /tmp/test_file

find <path> -newer /tmp/test_file -print
  #5 (permalink)  
Old 09-19-2007
marlonus999's Avatar
marlonus999 marlonus999 is offline
Registered User
  
 

Join Date: Dec 2006
Location: Manila
Posts: 27
Sorry, what I meant was finding files more than 30 minutes old but not older than 1 day:

30 min < file stamp < 24 hrs.

I'll be checking this using a script running on cron.
Thanks for your ideas..any more???

Note: -mmin option of find isn't available in AIX/HP-UX that i'm using
  #6 (permalink)  
Old 09-19-2007
SanjayLinux SanjayLinux is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 58
Wink Try this one

find / -type f -mmin -30

This will give all the files which one modified since last 30 min before.

find / -type f -mtime -3

This will give all the files which one modified since last 3 days

Thanks
Sanjay Tripathi
Closed Thread

Bookmarks

Tags
mtime

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 04:25 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