readlink(1)
Canonical URL: /readlink.1/
READLINK(1)
General Commands Manual
READLINK(1)
NAME
readlink —
display target of symbolic link on
standard output
SYNOPSIS
readlink |
[-fn] file |
DESCRIPTION
The readlink utility when invoked with the
pathname of a symbolic link as its argument dereferences the symbolic link
and prints the name of target on standard output. If the
-f option is not specified and
readlink is invoked with an argument other than the
pathname of a symbolic link, it exits with a nonzero exit code without
printing anything.
The options are as follows:
EXIT STATUS
The readlink utility exits 0 on
success, and >0 if an error occurs.
SEE ALSO
HISTORY
The readlink utility first appeared in
OpenBSD 2.1.
OpenBSD 7.9
October 13, 2021
READLINK(1)
Need conceptual guidance? Continue in the OpenBSD Handbook.