sbase/readlink.1

35 lines
797 B
Groff

.Dd January 30, 2015
.Dt READLINK 1
.Os sbase
.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
invoked with an argument other than the pathname of a symbolic link, it
exits with a nonzero exit code without printing anything.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl f
Canonicalize by following every symlink in every component of the
given path recursively. The argument does not need to be a symbolic
link.
.It Fl n
Do not output the trailing newline.
.El
.Sh SEE ALSO
.Xr readlink 2 ,
.Xr realpath 3