Ad space (banner)
🖥️Linux Lessons
Lesson 22 / 61

Checking a Folder's Usage with du

du is for when "I want to know how much disk space this folder is using." du stands for disk usage, and it shows how much disk space a given folder or file is actually consuming.

Use it in the form du folder-name. The -s option shows just a single total, and -h converts it into a human-readable unit like MB or GB.

Running du -sh . shows the total disk space used by the entire current folder, as a single readable line.

A common early mistake is running it without -s, producing an overwhelming, hard-to-read wall of per-subfolder detail. If you just want the total, always add -s.

In real work, checking a per-folder breakdown with something like du -sh */ is a common way to investigate whether a specific log or cache folder is eating up disk space.

Linux
Try it (type this into the pseudo terminal)
du -sh .

🧑‍💻 You can type this command into the Linux pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)