Skip to content

Comment on Hacking ls -lparent

Comments

A reasonably recent sort from GNU coreutils has a -h (and equivalent long option --human-numeric-sort) which properly sorts the output of du -h, meaning you can do:

du -h | sort -h

And get properly size-sorted output.

TIL! Thanks.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.