Find the Size of Files and Directories in Terminal

du (Disk Usage) is a super handy command line tool to list file sizes.  Common usage goes something like this:

du -h /path/to/directory

Which recursively lists all files in the directory in human readable forms. These are the switches I find most useful:

du -skhc /path/to/directory

- c, –total
Produce a grand total
-h, –human-readable
Print sizes in human readable format (e.g., 1K 234M 2G)
Use SIZE-byte blocks, equavalent to –block-size=1K
-s, –summarize
Display only a total for each argument