du¶
Estimate file and directory space usage.
Synopsis¶
Description¶
Estimate file and directory space usage. Similar to the Unix du command but cross-platform.
Flags¶
| Flag | Short | Description | Default |
|---|---|---|---|
--summarize |
-s |
Display only total for each path | false |
--all |
-a |
Write counts for all files, not just directories | false |
--human |
-h |
Print sizes in human readable format | false |
--max-depth |
-d |
Print total only if N or fewer levels deep | -1 |
--bytes |
-b |
Apparent size in bytes | false |
--apparent-size |
Print apparent sizes rather than disk usage | false |
|
--kilobytes |
-k |
Print in kilobytes | false |
--sort |
-S |
Sort by: size, name, none |
size |
--reverse |
-r |
Reverse the sort order | false |
--ignore-git |
Respect .gitignore files | false |
Examples¶
Show disk usage of current directory:
Human-readable output:
Summary only (total):
Limit depth:
Show all files (not just directories):
Sort by size (largest last):
Sort by name:
Fastest mode (no sorting, stream output):
Show apparent size in bytes:
Specific paths: