Most folks with a passing familiarity with Unix and Linux are aware of the
df command, but only some seem to be aware of the
du command. That command is quite useful for finding directories and files that are consuming a lot of disk space. In terms of automation,
du can be useful for reporting system info, monitoring resource consumption, et cetera.
I posted a TIL1 about displaying the total size of directory folders on Unix systems using the
du command. I’ve tested the TIL’s examples on OS X (or macOS) and on Ubuntu.