- List the sizes of a folder and any subfolders, in the given unit (B/KB/MB):du -[b|k|m] [path/to/folder]- List the sizes of a folder and any subfolders, in human-readable form (i.e. auto-selecting the appropriate unit for each size):du -h [path/to/folder]- Show the size of a single folder, in human readable units:du -sh [path/to/folder]- List the human-readable sizes of a folder and of all the files and folders within it:du -ah [path/to/folder]- List the human-readable sizes of a folder and any subfolders, up to N levels deep:du -h --max-depth=N [path/to/folder]- List the human-readable size of all .jpg files in subfolders of the current folder, and show a cumulative total at the end:du -ch */*.jpg
du [,OPTION/]... [,FILE/]... du [,OPTION/]... ,--files0-from=F/
Summarize disk usage of the set of FILEs, recursively for directories.
Mandatory arguments to long options are mandatory for short options too.
Display values are in units of the first available SIZE from --block-size, and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables. Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).
The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).
PATTERN is a shell pattern (not a regular expression). The pattern ? matches any one character, whereas * matches any string (composed of zero, one or multiple characters). For example, *.o will match any files whose names end in .o. Therefore, the command
will skip all files and subdirectories ending in .o (including the file .o itself).
Written by Torbjorn Granlund, David MacKenzie, Paul Eggert, and Jim Meyering.
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report du translation bugs to <http://translationproject.org/team/>
Copyright © 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Full documentation at: <http://www.gnu.org/software/coreutils/du> or available locally via: info '(coreutils) du invocation'