REALPATH(1) General Commands Manual REALPATH(1)

realpathprint resolved path

realpath [-E|-e] [-n|-z] [-s] path...

The realpath utility resolves ., .., and symlinks used in each path to print an absolute pathname.

When no flags are passed, this implementation assumes the behavior of -E.

Do not fail when the final path component does not exists and it's parent is a directory.
Fail when path does not exists.
Do not print a trailing separator.
Do not resolve symlinks.
Use NULL byte as separator instead of newlines.

The realpath utility exits 0 on success, and >0 if an error occurs.

realpath(3)

realpath should be compliant with the IEEE Std 1003.1-2024 (“POSIX.1”) specification.

The options -n, -s and -z and support for multiple path arguments are extensions present for compatibility with existing software.

Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>

2024-03-24 Linux 6.6.67-gentoo-x86_64