2015-01-30 22:34:36 +00:00
|
|
|
.Dd January 30, 2015
|
2015-01-31 13:20:02 +00:00
|
|
|
.Dt READLINK 1
|
2015-01-30 22:34:36 +00:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm readlink
|
|
|
|
.Nd print value of a symbolic link or canonical file name
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl fn
|
|
|
|
.Ar file
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility when invoked with the pathname of a symbolic link as
|
|
|
|
its argument dereferences the symbolic link and prints the name of the target
|
|
|
|
on standard output. If the
|
|
|
|
.Fl f
|
|
|
|
option is not specified and
|
|
|
|
.Nm
|
|
|
|
is
|
2013-06-15 14:17:57 +00:00
|
|
|
invoked with an argument other than the pathname of a symbolic link, it
|
|
|
|
exits with a nonzero exit code without printing anything.
|
2015-01-30 22:34:36 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl f
|
2013-06-15 14:17:57 +00:00
|
|
|
Canonicalize by following every symlink in every component of the
|
|
|
|
given path recursively. The argument does not need to be a symbolic
|
|
|
|
link.
|
2015-01-30 22:34:36 +00:00
|
|
|
.It Fl n
|
2013-06-15 14:17:57 +00:00
|
|
|
Do not output the trailing newline.
|
2015-01-30 22:34:36 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr readlink 2 ,
|
|
|
|
.Xr realpath 3
|