This required a bit more than a stock macOS; get GNU date with brew install coreutils (and if you didn’t know about the homebrew package manager, now’s the perfect time to learn).

macOS swap files

There was a time when macOS did a bad job of cleaning up swap files. For the computer I was using at the time, at about seven swapfiles things started swapping, paging, and hanging, so I kept track of their count and rebooted before I revisited that bad place.

ls -l /var/vm | grep swapfile | wc -l

uptime, natural language style

Want to see how long since your last reboot, your “up time”, in an easy-to-read natural language style, like 2 days 16 hours 38 minutes? The following very long command does the trick:

Universal Coordinated Time (UTC)

UTC – Universal Coordinated Time – is the shared abstract time reference that came into being with atomic clocks. Note that it’s not a timezone, like GMT (Greenwich Mean Time), but rather a term referring to mean solar time at the Royal Observatory, Greenwich, England. UTC is really useful when you’ve got people or computers around the world and you want a common time as a reference.

Displaying UTC in 24-hour format:

date -u +"%R"

iCalBuddy formatting

iCalBuddy displays the contents of your Apple Calendar database with a remarkable range of formatting options. The command

Internet Protocol (IP) addresses

Each device connected to the Internet — your laptop, your smartphone — acquire a worldwide unique identifier; your external IP address. Devices connected to a Wi-Fi access point are also a local or internal IP address.

GeekTool and images

Within GeekTool drag an “image” object onto the desktop and paste either a URL that points to an image or selects a local image. Specify an appropriate refresh interval, in seconds, if the URL points to webcam stills. Resizing the window resizes the window within. Cropping not supported.