NAME
realpath - return the canonicalised absolute pathname
SYNOPSIS
realpath
[-s|--strip]
[-z|--zero]
filename ...
realpath
R --h | --help
realpath
R --v | --version
DESCRIPTION
realpath
converts each
filename
argument to an absolute pathname, which has no
components that are symbolic links or the special
.
or
..
directory entries.
(See
realpath(3)
for more information.)
Please note that mostly the same functionality is provided by the `-f' option
of the
readlink(1)
command.
If option
-s
is used
realpath
only removes
.
and
..
directories, but not symbolic links from
R filename .
Each converted pathname is output to the standard output,
on its own line.
OPTIONS
R -s , --strip
Only strip
.
and
R .. ,
but do not resolve symbolic links.
R -z , --zero
Separate output filenames with the null character instead of newline,
so it can be used with the
`-0'
option of
xargs(1).
R -h , --help
Print short usage information.
R -v , --version
Show
R realpath 's
version number.
EXAMPLES
Let's suppose that
/usr/bin/X11
is a symbolic link, which points to directory
R /usr/bin .
Than
realpath /../usr/bin/X11/./xterm
prints
/usr/bin/xterm
but
realpath
I -s /../usr/bin/X11/./xterm
outputs
/usr/bin/X11/xterm
EXIT STATUS
realpath
returns a zero exit code when
all
pathnames was successfully converted.
In case of any errors (e.g. missing or unavailable directories in the path),
realpath
prints error message to stderr and returns a non-zero exit code.
SEE ALSO
AUTHOR
Modified by Robert Luberda <robert@debian.org>.