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.
--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).