du [options] [path]Arguments explained
- path is the file or directory to measure.
- -h uses human-readable sizes.
- -s summarizes instead of listing everything.
- -d limits directory depth on GNU systems.
Common examples
du -h -d 1 /var 2>/dev/nullShows first-level usage under /var while ignoring permission errors.
du -sh ~/DownloadsShows a single total for Downloads.
| Field | Details |
|---|---|
| Command | du |
| Category | Disk and Storage |
| Primary use | Estimates file and directory space usage. |
| Syntax | du [options] [path] |