READLINK(1) BSD Reference Manual READLINK(1)
readlink - display target of symbolic link or realpath on standard
readlink [-fn] file
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 in-
voked with an argument other than the pathname of a symbolic link, it ex-
its with a nonzero exit code without printing anything.
The options are as follows:
-f Canonicalize by following every symlink in every component of the
given path recursively. readlink will resolve both absolute and
relative paths and return the absolute pathname corresponding to
file. The argument does not need to be a symbolic link.
-n Do not print a trailing newline character.
The readlink utility exits 0 on success or >0 if an error occurred.
readlink(2), realpath(3)
The readlink utility first appeared in OpenBSD 2.1.
MirOS BSD #10-current August 18, 1997 1
Generated on 2013-04-27 00:20:00 by $MirOS: src/scripts/roff2htm,v 1.77 2013/01/01 20:49:09 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2013 The MirOS Project, Germany.
This product includes material
provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.