Re: Deleting files from O/S older than 6 hours
- From: Ajay Thotangare <ajayoraclel@xxxxxxxxx>
- To: Jared Still <jkstill@xxxxxxxxx>
- Date: Wed, 28 Nov 2007 14:37:54 -0800 (PST)
HP does not support mmin.
Thanks for good tip with respect to "-exec"
Jared Still <jkstill@xxxxxxxxx> wrote: On Nov 27, 2007 8:16 AM, Ajay Thotangare
wrote:
> Hi,
>
> I am using following command to delete files from o/s older than 24 hours.
> /usr/bin/find /u01/log/*.log -mtime +0 -exec ls -l {} \;
>
> Is there any way I can delete files older than 6 hours. I am using HP-UNIX.
> I tried using
> /usr/bin/find /u01/log/*.log -mtime +0.4 -exec ls -l {} \;
If HP/UX supports the -mmin find argument:
/usr/bin/find /u01/log/*.log -mmin +240 | xargs ls -ld
BTW, please stop using the '-exec' argument unless absolutely necessary.
every file found causes -exec to fork a shell to run ls - very, very, very slow.
--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
---------------------------------
Get easy, one-click access to your favorites. Make Yahoo! your homepage.
- Follow-Ups:
- Re: Deleting files from O/S older than 6 hours
- From: Jared Still
- References:
- Re: Deleting files from O/S older than 6 hours
- From: Jared Still
Other related posts:
- » Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » RE: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- Re: Deleting files from O/S older than 6 hours
- From: Jared Still
- Re: Deleting files from O/S older than 6 hours
- From: Jared Still