Skip to content
Table of GNU-to-BSD command differences on macOS: find -printf becomes find -ls or -exec stat; sed -i needs an empty ''; date -d becomes date -v or -j -f; stat -c becomes stat -f; with a note that brew install coreutils provides gdate, gstat, and greadlink.

Why Your Linux Commands Fail on macOS (BSD vs GNU)

macOS’s command-line tools come from BSD, not the GNU coreutils that ship with most Linux distributions. They cover the same ground, but their flags don’t always match — so a command copied straight from a… 
Three verified macOS Terminal commands in a table: printf '%s' "user:pw" | base64 gives dXNlcjpwdw==; base64 -d

How to Encode and Decode Base64 on macOS

macOS ships a base64 command at /usr/bin/base64, so there’s nothing to install — it’s the FreeBSD version, which differs from the GNU one on Linux in a couple of ways worth knowing. This covers encoding…