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

Making Usage Human-Readable with du -h

du -h is for when "I want to see a folder's disk usage in a readable unit, not raw bytes." Adding the -h option automatically converts the size into a human-readable unit like KB, MB, or GB.

Use it in the form du -h folder-name. -h means human-readable, and it makes du's otherwise hard-to-read byte counts much easier to understand.

Running du -h project displays the usage of the project folder and each of its subfolders in a readable unit, like 1.2M.

A common early mistake is a flood of per-subfolder detail making it hard to spot the total you actually wanted. If you just want the total, combine it with -s too, as du -sh.

In real work, du -h or du -sh is the single most common combination used to investigate which folder is eating up disk space.

Linux
Try it (type this into the pseudo terminal)
du -h project

🧑‍💻 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)