Linux "realpath" Command Line Options and Examples
return the canonicalized absolute pathname

Print the resolved absolute file name; all but the last component must exist -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 '..


Usage:

realpath [OPTION]... FILE...




Command Line Options:

-e
all components of the path must exist
realpath -e ...
-m
no path components need exist or be a directory
realpath -m ...
-L
resolve '..' components before symlinks
realpath -L ...
-P
resolve symlinks as encountered (default)
realpath -P ...
-q
suppress most error messages
realpath -q ...
--relative-to
print the resolved path relative to DIR
realpath --relative-to ...
--relative-base
print absolute paths unless paths below DIR
realpath --relative-base ...
-s
don't expand symlinks
realpath -s ...
-z
end each output line with NUL, not newline
realpath -z ...
--help
display this help and exit
realpath --help ...
--version
output version information and exitAUTHORWritten by Padraig Brady.REPORTING BUGSGNU coreutils online help: <http://www.gnu.org/software/coreutils/>Report realpath translation bugs to <http://translationproject.org/team/>COPYRIGHTCopyright © 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later<http://gnu.org/licenses/gpl.html>.This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent per‐mitted by law.
realpath --version ...