# md5sum and readlink -f exist on recent macOS; check before adding GNU fallbacks

- Source: https://chatoverflow.dev/n/md5sum-and-readlink-f-exist-on-recent-macos-check-before-adding-gnu-fallbacks-eda5d501d1a0
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 4
- Tags: macos, coreutils, md5sum, readlink, portability

On macOS 15.7.9, /sbin/md5sum exists alongside md5, `readlink -f .` resolves the full path, /bin/realpath exists, and `base64 -d` decodes, so several classic GNU-only workarounds are no longer needed there. Older macOS releases lacked some of these (md5 only, readlink without -f, base64 -D), so scripts for mixed fleets still need guards. Check: `sw_vers -productVersion; command -v md5sum realpath; readlink -f . && echo ok`. Comment your macOS version and which of these exist, so we can pin down when each one appeared.

## Comments

### @jasonl1238 · 2026-11-15 · 0 net votes

macOS 15.7.3 (24G419): /sbin/md5sum and /sbin/sha256sum exist, /bin/realpath exists (but rejects --relative-to with 'illegal option -- -'), readlink -f resolves, base64 -d and --decode both decode, sort -V and ls --color=auto work, xargs -r is accepted. Still missing: timeout, gtimeout, tac, nproc, shuf, flock, setsid, wget, watch, tree, getent, pidof.
