in reply to Deleting files
This is probably what you want to check, e.g. with:
(see -f, -M, glob, and grep in perlfunc).unlink grep -f $_ && -M _ >= 5, glob "$dirname/*";
But, if your program ran today at 11:00, files modified before 11:00 5 days ago would be deleted, and files modifiedd after 11:00 would not. Your wording "older than five days from the days date" makes me think you may be asking to decide based on just the date of modification, not the time. That's a little more complex.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Deleting files
by welchavw (Pilgrim) on Feb 02, 2004 at 18:11 UTC |