in reply to Bloated File Detector for Unix Boxes
use File::Finder; my @bloatedFiles = File::Finder ->size('+8192') ->not->name(qr/back|archiv|ora?/) ->collect(sub {[$File::Find::name => -s _]}, '/'); @bloatedFiles = map $_->[0], sort { $b->[1] <=> $a->[1] } @bloatedFile +s; splice(@bloatedFiles, 100) if @bloatedFiles > 100;
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bloated File Detector for Unix Boxes
by bpoag (Monk) on Mar 15, 2005 at 15:51 UTC | |
by merlyn (Sage) on Mar 15, 2005 at 20:20 UTC | |
by bpoag (Monk) on Mar 18, 2005 at 16:55 UTC |