Re: RE : OT: find command on rhel4 not working with mtime
- From: "Jared Still" <jkstill@xxxxxxxxx>
- To: mariu200@xxxxxxxxx
- Date: Wed, 12 Jul 2006 10:09:23 -0700
On 7/12/06, Marius Raicu <mariu200@xxxxxxxxx> 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
- Follow-Ups:
- RE : Re: RE : OT: find command on rhel4 not working with mtime
- From: Marius Raicu
- References:
- OT: find command on rhel4 not working with mtime
- From: Steve Perry
- RE : OT: find command on rhel4 not working with mtime
- From: Marius Raicu
Other related posts:
- » RE : OT: find command on rhel4 not working with mtime
- » Re: RE : OT: find command on rhel4 not working with mtime
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 {} \;-- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist
- RE : Re: RE : OT: find command on rhel4 not working with mtime
- From: Marius Raicu
- OT: find command on rhel4 not working with mtime
- From: Steve Perry
- RE : OT: find command on rhel4 not working with mtime
- From: Marius Raicu