macOS / binaries /

realpath

/usr/local/bin/realpath
Print the resolved path

realpath prints the resolved absolute file name.

/bin/realpath
Utility that uses realpath function to resolve all symbolic links

The realpath utility uses the realpath function to resolve all symbolic links, extra characters and references to /./ and /../ in path. If path is absent, the current working directory is assumed.

source: man