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

4.0K insight/src/tcl/Makefile
8.0K insight/src/tcl/config.cache
24K insight/src/tcl/testsuite
80K insight/src/tcl/configure
172K insight/src/tcl/ChangeLog
552K insight/src/tcl/tools
1.2M insight/src/tcl/mac
1.6M insight/src/tcl/doc
2.0M insight/src/tcl/library
4.4M insight/src/tcl/generic
13M insight/src/tcl/unix

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.