currently the code I have below returns me or print out
in sorted order the largest file size and their path.
I need help to change it to
1. find the file size of regular files as well as size of
symbolic links
2. return in sorted order the disk usage and their respective users
thanks
================
my %size;
my @sorted;
find (sub {
$size{$File::Find::name} = -s if -f; }, @paths
);
@sorted = sort {$size{$b} <=> $size{$a}} keys %size;
splice @sorted, 20 if @sorted > 20;
foreach (@sorted) {
printf ("Hello %10d %s\n", $size{$_}, $_);
}
in sorted order the largest file size and their path.
I need help to change it to
1. find the file size of regular files as well as size of
symbolic links
2. return in sorted order the disk usage and their respective users
thanks
================
my %size;
my @sorted;
find (sub {
$size{$File::Find::name} = -s if -f; }, @paths
);
@sorted = sort {$size{$b} <=> $size{$a}} keys %size;
splice @sorted, 20 if @sorted > 20;
foreach (@sorted) {
printf ("Hello %10d %s\n", $size{$_}, $_);
}