Article 6NHQM How to sort du (disk usage) by size?

How to sort du (disk usage) by size?

by
exerceo
from LinuxQuestions.org on (#6NHQM)
du * |sort does not work because the numbers produced by the "du" (disk usage) command are left-aligned. This means the sorting order is 1, 10, 11, .., 100, 101.

Is there any way to sort disk usage by size in the terminal?

There is already "baobab", but I would also like to have it in the terminal.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments