4.3.2. du — estimate disk usage of files or directories#

Calculate the amount of disk space used by files or directories.

For example, to calculate the amount of disk space used by files in your home directory, use the command:

du -sh ~

Output:

7.4G .

The -s option prints a summary instead of printing space used by individual files.

-h makes the output human-readable.