In this post, we will use the du command. This command does estimate file space usage; and It will summarize disk usage of each FILE, recursively for directories.
The description on the arguments we will use.
-h, —human-readable print sizes in human readable format (e.g., 1K 234M 2G) -s, —summarize display only a total for each argument
How to Summarize a single Folder Size
1 2 3
Summarize a certain folder size.
How to summarize multiple folders sizes
1 2 3 4 5 6
More detailed information
ls – list directory contents
Description:List information about the FILEs (the current directory by default) xargs – build and execute command lines from standard input