GNU "sort" just got a bit smarter
Yay. GNU "sort" now understands human readable filesizes. From coreutils 7.5 onwards this feature in incorporated. This means that you can now do "df -skh | sort -h" and get an output properly sorted by item size. This is the exerpt from the coreutils-8.1 Changelog :
2009-07-03 Pádraig Brady sort: allow SI and IEC units on separate human sort fields
An example output looks like this:
du -skh * | sort -h
There we go. All folders nicely sorted by human readable size. I never understood why this was not in there all along. A patch has been available for 5 (!) years now:
Today I discovered that somebody finally added this patch upstream. Excellent! Thanks Pádraig.