
Debian: how to decently sort du -sh * - giuseppeurso
http://blog.giuseppeurso.net/debian-how-to-decently-sort-du-sh/index.html
======
epo
There is a much better solution (on systems which support it, OS X doesn't).

du -h | sort -h

sort -rh for reverse sorting, pipe into head or tail for the first/last few
etc.

[http://www.cyberciti.biz/faq/how-do-i-sort-du-h-output-by-
si...](http://www.cyberciti.biz/faq/how-do-i-sort-du-h-output-by-size-under-
linux/)

~~~
joosters
Or, for all systems:

du -sk |sort -n

Sure, the results are in kilobytes but it's not that hard to read. It's even
clearer in a way, it's obvious at a glance as to which entries are orders of
magnitude bigger, since they have more numbers next to them.

~~~
epo
Yes, that is probably better. I needed to use du -k (Centos).

------
giuseppeurso
Just used on my nas!

