in reply to Deleting files over 2 weeks old?
"Files over two weeks old" is often an ambiguous specification. For deleting items from a cache, I suggest the "atime" value (most recent access), as it is often indicative of an orphan when there are no more accesses in a long time.
As for using Perl to zap files with big atimes, I'd go for a command-line-written chunk of code:
$ find2perl /some/dir -atime +14 -eval unlink >MyProggy $ chmod +x MyProggy $ ./MyProggy # as you wish
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jcwren) RE: Re: Deleting files over 2 weeks old?
by jcwren (Prior) on Aug 03, 2000 at 02:47 UTC | |
by merlyn (Sage) on Aug 03, 2000 at 02:57 UTC | |
by Jonathan (Curate) on Aug 03, 2000 at 13:15 UTC | |
by jettero (Monsignor) on Aug 03, 2000 at 04:46 UTC | |
by merlyn (Sage) on Aug 03, 2000 at 04:50 UTC |