You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
407 B
Plaintext
16 lines
407 B
Plaintext
12 years ago
|
#!/usr/bin/env perl
|
||
|
|
||
|
# Get sorted list files
|
||
|
my @sortedFiles = `du -s * | sort -nr`;
|
||
|
|
||
|
foreach my $file (@sortedFiles) {
|
||
|
# Get just the file name, remove size
|
||
|
my @fileName = split("\t", $file);
|
||
6 years ago
|
my $realFileName = $fileName[1];
|
||
12 years ago
|
chomp($realFileName);
|
||
|
|
||
|
# Print the size of the file and the file size
|
||
6 years ago
|
my $fileSortedPrintCmd = "du -s \"$realFileName\"";
|
||
12 years ago
|
print `$fileSortedPrintCmd`;
|
||
|
}
|