http://www.perlmonks.org?node_id=746975


in reply to du -h, sorted

I can't stop looking at this unbeliev unbellairevable one-liner! Alas, in your Update, you went from 7**(ord$&&30) to 99**(ord$&&7), and the new one mis-sorts empty files.

And I can eke out one last character in a reversed sort:

perl -e '%h=map{/.\s/;7x(ord$&&10)+$`,$_}`du -h`;die@h{sort%h}'