RE: [Perl-unix-users] Removing files older than 10 days from a directory

2003-11-07 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Title: RE: [Perl-unix-users] Removing files older than 10 days from a directory if ( int( -M $file) > $days || $days == 0 )  The only thing to be careful is if you decide to make this a service or constantly running script, using the -M is the point in time that the scr

RE: [Perl-unix-users] Removing files older than 10 days from a directory

2003-11-07 Thread Craig Sharp
Travis, The attachment did not come through. Please try again or you can just send it by email. Thanks, Craig >>> Travis Hoyt <[EMAIL PROTECTED]> 11/07/03 01:57PM >>> Here's our version for Oracle being backed up by Veritas NetBackup. I tried to just cut and paste this but it isn't keeping

RE: [Perl-unix-users] Removing files older than 10 days from a directory

2003-11-07 Thread Travis Hoyt
Here's our version for Oracle being backed up by Veritas NetBackup. I tried to just cut and paste this but it isn't keeping the tabbing right.  I'll upload it as a text attachment. Our version is more complicated than previous versions offered but there is a great deal more accounted for with t

RE: [Perl-unix-users] Removing files older than 10 days from a directory

2003-11-07 Thread Craig Sharp
ot;Done.\n"; } } -Original Message- From: Craig Sharp [mailto:[EMAIL PROTECTED] Sent: Friday, November 07, 2003 7:02 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [Perl-unix-users] Removing files older than 10 days from a directory

Re: [Perl-unix-users] Removing files older than 10 days from a directory

2003-11-07 Thread Craig Sharp
Travis, You hit the nail on the head. I need to do the same with DB2 logs. Thanks, Craig >>> Travis Hoyt <[EMAIL PROTECTED]> 11/07/03 06:14AM >>> find /path/to/dir -mtime +30 -exec rm '{}' \; however in some cases you may want to use perl to do this. if removing the files is part of a large

Re: [Perl-unix-users] Removing files older than 10 days from a directory

2003-11-07 Thread Travis Hoyt
find /path/to/dir -mtime +30 -exec rm '{}' \; however in some cases you may want to use perl to do this. if removing the files is part of a larger perl effort using the system or exec function to call find could consume more resources than using native perl calls. if you want to do it all in

Re: [Perl-unix-users] Removing files older than 10 days from a directory

2003-11-06 Thread Michael A Nachbaur
On Thursday 06 November 2003 04:36 pm, Craig Sharp wrote: > Hi, > > I guess the subject says it all. I have a set of directories on Unix. > I need to remove all files that are older than 10 days from each > directory. > > I am having a brain lock problem and cannot get started. > > Any ideas would