REALPATH(1) General Commands Manual REALPATH(1)

realpathprint resolved path

realpath [-E|-e] [-n|-z] [-qs] 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 print errors/warnings when realpath(3) fails. Messages about other errors, such as bad usage, are still printed.
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, -q, -s, -z, and support for multiple path arguments are extensions present for compatibility with existing software.

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

September 27, 2024 Linux