Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE : Re: RE : OT: find command on rhel4 not working with mtime

RE : Re: RE : OT: find command on rhel4 not working with mtime

From: Marius Raicu <mariu200_at_yahoo.com>
Date: Wed, 12 Jul 2006 20:02:03 +0200 (CEST)
Message-ID: <20060712180203.62320.qmail@web55305.mail.re4.yahoo.com>


Jared,
Honestly, I didn't searched too far, because I use this find command to clean the export dumps for some small databases. And as it is executed every week, the number of files is always 7 so it has virtually no impact on perfs. But I'll give it a try with xargs, hovewer. Thanks,

Jared Still <jkstill_at_gmail.com> a écrit : On 7/12/06, Marius Raicu <mariu200_at_yahoo.com> wrote: Hi, I'm on RHEL3 and I use something like this, which works

/usr/bin/find /u08/bla/bla/*.* -mtime +31 -print -exec /bin/rm {} \;

You know of course, that '-exec CMD {} \:' is evil.

For simple commands that accept a single argument, xargs is superior.

eg. /usr/bin/find /u08/bla/bla/*.* -mtime +31 -print | xargs rm

-exec forks and executes a shell for each file, xargs does not.  

Try comparing the execution times of both methods.

-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
 


Regards,
Marius
 		
---------------------------------
 Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. 
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jul 12 2006 - 13:02:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US