Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Deleting filesby welchavw (Pilgrim) |
on Feb 02, 2004 at 15:49 UTC ( [id://325881]=note: print w/replies, xml ) | Need Help?? |
Mark, You'll need to be a little clearer, since I can't tell if you want to delete files not modified within 5 days or those created more than five days from the present time. I'd guess that you mean modification time, in which case you'll need to look at the -M operator. Something like the following...
Regards,
Update: Please see ysth's explanation below of why this simplistic logic is a non-starter for scripts that run for a long time.
In Section
Seekers of Perl Wisdom
|
|