What does du do?
du shows how much space files and folders take. du -sh folder gives one human-readable total.
du [-sh] [path]
Most useful options
| Option | What it does |
|---|---|
| -s | only the total |
| -h | human-readable |
| --max-depth=1 | one level of sub-folders |
du examples
In security work
Unexpected huge folders can be data staged by an attacker before stealing it.
Questions about du
What is the difference between df and du?
df = space on whole disks; du = space used by specific files and folders.