1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-29 06:15:28 +02:00
tldr/pages/osx/du.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

27 lines
882 B
Markdown

# du
> Disk usage: estimate and summarize file and directory space usage.
- List the sizes of a directory and any subdirectories, in the given unit (KB/MB/GB):
`du -{{k|m|g}} {{path/to/directory}}`
- List the sizes of a directory and any subdirectories, in human-readable form (i.e. auto-selecting the appropriate unit for each size):
`du -h {{path/to/directory}}`
- Show the size of a single directory, in human readable units:
`du -sh {{path/to/directory}}`
- List the human-readable sizes of a directory and of all the files and directories within it:
`du -ah {{path/to/directory}}`
- List the human-readable sizes of a directory and any subdirectories, up to N levels deep:
`du -h -d {{N}} {{path/to/directory}}`
- List the human-readable size of all `.jpg` files in subdirectories of the current directory, and show a cumulative total at the end:
`du -ch */*.jpg`