home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl -w
- # You can alternatively just do:
- # find . -xdev -type f -print0 | xargs -r0 ls -l | sort -rn +4 | head -20
- use File::Find;
-
- @ARGV = $ENV{ PWD } unless @ARGV;
- find ( sub { $size{ $File::Find::name } = -s if -f; }, @ARGV );
- @sorted = sort { $size{ $b } <=> $size{ $a } } keys %size;
- splice @sorted, 20 if @sorted > 20;
- printf "%10d %s\n", $size{$_}, $_ for @sorted
-
-