Tuesday, December 08, 2009

Sorting DU results

A quick 'one-liner' to sort the results of a du by size.

from: http://ubuntuforums.org/showthread.php?t=885344

sudo du -hx --max-depth=1 / | perl -e '%byte_order = ( G => 0, M => 1, K => 2 ); print map { $_->[0] } sort { $byte_order{$a->[1]} <=> $byte_order{$b->[1]} || $b->[2] <=> $a->[2] } map { [ $_, /([MGK])/, /(\d+)/ ] } <>'


Viagra Generika kaufen said...

Thank you for sharing that link. Helped me out a lot.

Unknown said...

Thanks for posting the details,its really a good information
ap ssc results 2017

technode said...

Thanks for sharing , very informative and presented well , keep updating morered hat linux training centers in chennai|red hat linux training institute in chennai|red hat training institutes in chennai|linux courses in chennai|linux classes in chennai|linux certification centers in chennai

Susan said...

I will bookmark this site and take the feeds also…I’m happy to locate so much useful information right here within the article. Find out today's Celebrity birthdays and discover who shares your birthday. We make it simple and entertaining to learn about celebrities.