CmdID

CmdID / Commands

du

Show disk usage, space consumed by files and directories. toybox

On Linux, macOS

Opens CmdID with your command. It is read in your browser and sent nowhere.

Linux

from the toybox, 0BSD
du [-d N] [-abcHKkLlmsx] [FILE...]
Show 13 options
-bApparent bytes (directory listing size, not space used)
-hHuman readable (e.g., 1K 243M 2G)
-k1024 byte blocks (default)
-K512 byte blocks (posix)
-mMegabytes
-aAll files, not just directories
-cCumulative total
-d NOnly depth < N
-HFollow symlinks on cmdline
-LFollow all symlinks
-lDisable hardlink filter
-sOnly total size of each argument
-xDon't leave this filesystem

Several platforms

from tldr-pages, CC BY 4.0

Disk usage: estimate and summarize file and directory space usage.

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

du -b path/to/directoryIdentify
-bApparent bytes (directory listing size, not space used) toybox

List the sizes of a directory and any subdirectories, in human-readable form (i.e. auto-selecting the appropriate unit for each size)

du --human-readable path/to/directoryIdentify

Show the size of a single directory, in human-readable units

du --summarize --human-readable path/to/directoryIdentify

List the human-readable sizes of a directory and of all the files and directories within it

du --all --human-readable path/to/directoryIdentify

List the human-readable sizes of a directory and any subdirectories, up to n levels deep

du --human-readable --max-depth n path/to/directoryIdentify

List the human-readable size of all .jpg files in current directory, and show a cumulative total at the end

du --total --human-readable *.jpgIdentify

List all files and directories (including hidden ones) above a certain threshold size (useful for investigating what is actually taking up the space)

du --all --human-readable --threshold 1G .[^.]* *Identify

Disk usage: estimate and summarize file and directory space usage.

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

du -k path/to/directoryIdentify
-k1024 byte blocks (default) toybox

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/directoryIdentify
-hHuman readable (e.g., 1K 243M 2G) toybox

Show the size of a single directory, in human-readable units

du -sh path/to/directoryIdentify
-sOnly total size of each argument toybox
-hHuman readable (e.g., 1K 243M 2G) toybox

List the human-readable sizes of a directory and of all the files and directories within it

du -ah path/to/directoryIdentify
-aAll files, not just directories toybox
-hHuman readable (e.g., 1K 243M 2G) toybox

List the human-readable sizes of a directory and any subdirectories, up to n levels deep

du -h -d n path/to/directoryIdentify
-hHuman readable (e.g., 1K 243M 2G) toybox
-dOnly depth < N toybox

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 */*.jpgIdentify
-cCumulative total toybox
-hHuman readable (e.g., 1K 243M 2G) toybox