realpath(1)

realpath1

Print the resolved path

Usage

realpath [OPTION] ... FILE ...

Overview

Print the resolved absolute file name.

-E, --canonicalize

all but the last component must exist (default)

-e, --canonicalize-existing

all components of the path must exist

-m, --canonicalize-missing

no path components need exist or be a directory

-L, --logical

resolve '..' components before symlinks

-P, --physical

resolve symlinks as encountered (default)

-q, --quiet

suppress most error messages

--relative-to=DIR

print the resolved path relative to DIR

--relative-base=DIR

print absolute paths unless paths below DIR

-s, --strip, --no-symlinks

don't expand symlinks

-z, --zero

end each output line with NUL, not newline

--help

display this help and exit

--version

output version information and exit

Releases

18 releases since Debian 1.2 (Rex); the text changed 13 times.

  1. 1.2–2.2
  2. 3.0
  3. 3.1
  4. 4.0
  5. 5.0
  6. 6.0
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. Arch

--canonicalize since Arch Linux 2026-11-01; --canonicalize-existing since Debian 8 (Jessie); --canonicalize-missing since Debian 8 (Jessie); --help since Debian 4.0 (Etch); --logical since Debian 8 (Jessie); --no-symlinks since Debian 8 (Jessie); --physical since Debian 8 (Jessie); --quiet since Debian 8 (Jessie); --relative-base since Debian 8 (Jessie); --relative-to since Debian 8 (Jessie); --strip since Debian 4.0 (Etch); --version since Debian 4.0 (Etch); --zero since Debian 4.0 (Etch); -E since Arch Linux 2026-11-01; -L since Debian 8 (Jessie); -P since Debian 8 (Jessie); -e since Debian 8 (Jessie); -m since Debian 8 (Jessie); -q since Debian 8 (Jessie); -s since Debian 4.0 (Etch); -z since Debian 4.0 (Etch).

-h until Debian 7 (Wheezy); -v until Debian 7 (Wheezy).

Author

Written by Padraig Brady.

Reporting bugs

Report bugs to: <[email protected]>.
Report any translation bugs to: <https://translationproject.org/team/>.
GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
General help using GNU software: <https://www.gnu.org/gethelp/>

From coreutils 9.12-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.