« Back to File systems: Frequently Asked Questions

How to see the size of a directory

With the du command the directory size can be retrieved. By using it with the options --human-readable and --summarize, a summarized total will be displayed.

Disk Usage

The du tool is very powerful to show disk usage of files and directories, but it needs the right options to get the right information. A good combination to start is using ‘-h’, so the output becomes human-readable and the output size is shown in kilobytes, megabytes, etc.

du -h

Now the output can be long, so summarizing is a good idea.

du -hs

You can also define a specific path

du -hs /etc

Learn more about du

This article uses the du command to achieve its tasks. For this popular tool there is a cheat sheet available!

» Mastering the tool: du

du cheat sheet

Other questions related to Linux file systems


Is the described answer not working or incorrect, got another tip or question? Share your thoughts!