37 lines
611 B
Groff
37 lines
611 B
Groff
.Dd January 31, 2015
|
|
.Dt READLINK 1
|
|
.Os sbase
|
|
.Sh NAME
|
|
.Nm readlink
|
|
.Nd print symbolic link target or canonical file name
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl fn
|
|
.Ar name
|
|
.Sh DESCRIPTION
|
|
If
|
|
.Ar name
|
|
is a symbolic link,
|
|
.Nm
|
|
writes its target to stdout.
|
|
If
|
|
.Fl f
|
|
is not set and
|
|
.Ar name
|
|
is not a symbolic link,
|
|
.Nm
|
|
exits with a nonzero exit code without printing anything.
|
|
.Sh OPTIONS
|
|
.Bl -tag -width Ds
|
|
.It Fl f
|
|
Canonicalize
|
|
.Ar name ,
|
|
which does not need to be a symlink,
|
|
by recursively following every symlink in its components.
|
|
.It Fl n
|
|
Do not output the trailing newline.
|
|
.El
|
|
.Sh SEE ALSO
|
|
.Xr readlink 2 ,
|
|
.Xr realpath 3
|