HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by felixgallo | Hacker News Reader
Full thread
felixgallo
·
du -s * | sort -n -r | sed 10q
View on HN
theossuary
·
Okay, but now show me the size of the file in a human readible format next to the name.
PeterWhittaker
·
du -s -h * | sort -r -h
benhoyt
·
You can use the "-h" (human-readable) options to du and sort to do this:
$ du -sh * | sort -rh 20M dist 6.9M pebble 1.5M internal 308K cmd ...
matja
·
add: | numfmt --to=iec
felixgallo
·
it's already in a human readable format next to the name.
e12e
·
"sed 10q" is equivalent to "head"?
Reply on news.ycombinator.com