FG

How to get the summarized sizes of directories and their subdirectories?

Fresh3 days ago
Mar 15, 2026874186 views
Confidence Score1%
1%

Problem

Let's say I want to get the size of each directory of a Linux file system. When I use I don't really get the summarized size of the folders. If I use I get the size of each mounted file system but that also doesn't help me. And with I get the size of each subdirectory and the summary of the whole file system. But I want to have only the summarized size of each directory within the ROOT folder of the file system. Is there any command to achieve that?

Error Output

ls -la

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to get the summarized sizes of directories and their subdirectories?

Low Risk

This does what you're looking for: What this means: to give only the total for each command line argument. for human-readable suffixes like for megabytes and for gigabytes (optional). simply expands to all directories (and files) in . Note: dotfiles are not included; run to include those too. Also useful is sorting by size: Here: ensures that interprets the human-readable suffixes correctly.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment