Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
pwg
on Oct 14, 2012
|
parent
|
context
|
favorite
| on:
Hacking ls -l
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.
dredmorbius
on Oct 15, 2012
[–]
TIL! Thanks.
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
du -h | sort -h
And get properly size-sorted output.