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…