1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-31 08:17:59 +01:00
tldr/pages/osx/du.md

20 lines
481 B
Markdown
Raw Normal View History

# du
> Estimate file space usage.
- Get a sum of the total size of a file/folder in human readable units:
`du -sh {{path/to/file_or_folder}}`
- List file sizes of a directory and any subdirectories in KB:
`du -k {{path/to/file_or_folder}}`
- Get recursively, individual file/folder sizes in human readable form:
`du -ah {{path/to/folder}}`
- List the human-readable sizes of directories for 2 levels of depth below the specified directory:
`du -h -d 2 {{path/to/folder}}`