Find disk usage sorted by size

To find all folders and it's disk usage sorted by size, you can use the following cmd

Copy
du -ck | sort -n

To find all files in a folder and it's size,

Copy
ls -l --block-size=MB

or

Copy
ls -lh

Share this article

Code from Dude

Engineering, systems, and the decisions behind durable work.

© 2026, Gokul Prabhu