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 be a big help.
You don't actually need perl for this. You can just use the Unix "find" command. For example (I haven't tested this, so caveat emptor): find /root/to/search/from -ctime +10 -exec rm '{}' ';' I don't know if I have the -ctime argument right, but basically you want to say for every file not updated within the last ten days, execute "rm" on it. Anyone know for certain what the correct syntax would be for this? -- /* Michael A. Nachbaur <[EMAIL PROTECTED]> * http://nachbaur.com/pgpkey.asc */ ...[Arthur] leapt to his feet like an author hearing the phone ring... _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs