Add crappy script to get sorted filesize of files in directory

This script is not very good, it's buggy and slow. I really need to fix
it or make it something better one of these days
main
Buddy Sandidge 12 years ago
parent 0927ef7b20
commit 36cc876558

@ -0,0 +1,16 @@
#!/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);
my $realFileName = @fileName[1];
chomp($realFileName);
# Print the size of the file and the file size
my $fileSortedPrintCmd = "du -hs \"$realFileName\"";
print `$fileSortedPrintCmd`;
}
Loading…
Cancel
Save