Output the size of all child directories in Linux

Get the size in MB/GB of all child folders.

We will be using the du utility, short for disk usage.

Command: sudo du -sh *

Breakdown:

-s, --summarize display only a total for each argument
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)

* Wildcard to view all directories


Cover image credit: https://unsplash.com/@aznbokchoy

Last modified: 31st October 2021

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.