Posted By

nohn on 09/19/10


Tagged

sort Bash awk du


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

kubaitis
zitter
symsec


Sort Directories by Size (Human Readable)


 / Published in: Awk
 

URL: http://till.klampaeckel.de/blog/archives/114-Find-space-hogs-and-prettify-output-using-AWK.html

  1. du --max-depth 1|sort -n|awk '{ $1=$1/1024; printf "%.2f MB: %s\n",$1,$2 }'

Report this snippet  

You need to login to post a comment.