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
		
	
	
	
		
			Perl
		
	
			
		
		
	
	
			16 lines
		
	
	
		
			407 B
		
	
	
	
		
			Perl
		
	
#!/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 -s \"$realFileName\"";
 | 
						|
    print `$fileSortedPrintCmd`;
 | 
						|
}
 |