du [options][tree]

Summarize disk usage each tree, recursively for directories.

--max-depth=ndisplay the total for a directory (or file with --all) only if it is N or fewer levels below the command line argument
--max-depth=0 is the same as --summarize
display only a total for each tree
produce a grand total of all trees specified
use size-byte blocks
size an integer optionally followed by: kB 1000, K 1024, MB 1,000,000, M 1,048,576, … G, T, P, E, Z, Y .
-k --block-size=1K
display size in bytes
display print sizes in human readable format (e.g., 1K 234M 2G)
use powers of 1,000
count all files, not just directories
count sizes many times if hard linked
dereference FILES that are symbolic links
dereference all symbolic links
do not include size of subdirectories
skip directories on different filesystems
-X file
Exclude files that match any pattern in file.
--exclude=patternExclude files that match pattern.

Directories are not necessarily listed in alphabetical order unless   | sort -k2   is appended to the command.

pattern is a shell pattern (not a regular expression).
? matches any one character,
* matches any string (composed of zero, one or multiple characters).

Example: *.o will match files ending in .o .

Exclude all files and subdirectories ending in .o (including the file .o ).

du --exclude='*.o'

Comparing trees on different volumes will produce different sizes if using different allocation schemes.