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.

All the TILs.

  1. TIL is an acronym for “Today I Learned”. One maintains a collection of small, useful learnings; each item in the collection is referred to as a “TIL”. See the introductory post on TILs.