Skip to content

Latest commit

 

History

History
52 lines (39 loc) · 2.44 KB

du.md

File metadata and controls

52 lines (39 loc) · 2.44 KB
layout title description content_hash last_modified_at related_topics tldri18n_status
page
osx/du (English)
Disk usage: estimate and summarize file and directory space usage.
d5b6e5799caad0bae31060aea1ddcd5c150de1b1
2024-01-31
title url icon
español version
/es/osx/du.html
bi bi-globe
title url icon
Nederlands version
/nl/osx/du.html
bi bi-globe
title url icon
português (Brasil) version
/pt_BR/osx/du.html
bi bi-globe
title url icon
中文 version
/zh/osx/du.html
bi bi-globe
title url icon
中文 (繁體, 台灣) version
/zh_TW/osx/du.html
bi bi-globe
2

du

Disk usage: estimate and summarize file and directory space usage. More information: https://keith.github.io/xcode-man-pages/du.1.html.

  • List the sizes of a directory and any subdirectories, in the given unit (KiB/MiB/GiB):

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 2 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