4 ms·
Debian: how to decently sort du -sh *
- epo 13y agoThere 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-size-under-linux/ http://www.cyberciti.biz/faq/how-do-i-sort-du-h-output-by-si...
- joosters 13y agoOr, 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 13y agoYes, that is probably better. I needed to use du -k (Centos).
- giuseppeurso 13y agoJust used on my nas!