du
Show disk usage, space consumed by files and directories. toybox
On Linux, macOS
Linux
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 filesystemSeveral platforms
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) toyboxList 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/directoryIdentifyShow the size of a single directory, in human-readable units
du --summarize --human-readable path/to/directoryIdentifyList the human-readable sizes of a directory and of all the files and directories within it
du --all --human-readable path/to/directoryIdentifyList the human-readable sizes of a directory and any subdirectories, up to n levels deep
du --human-readable --max-depth n path/to/directoryIdentifyList the human-readable size of all .jpg files in current directory, and show a cumulative total at the end
du --total --human-readable *.jpgIdentifyList 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 .[^.]* *IdentifymacOS
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) toyboxList 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) toyboxShow 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) toyboxList 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) toyboxList 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 toyboxList 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