sbase/readlink.1

37 lines
611 B
Groff
Raw Normal View History

.Dd January 31, 2015
.Dt READLINK 1
.Os sbase
2015-01-30 17:34:36 -05:00
.Sh NAME
.Nm readlink
.Nd print symbolic link target or canonical file name
2015-01-30 17:34:36 -05:00
.Sh SYNOPSIS
.Nm
.Op Fl fn
.Ar name
2015-01-30 17:34:36 -05:00
.Sh DESCRIPTION
If
.Ar name
is a symbolic link,
2015-01-30 17:34:36 -05:00
.Nm
writes its target to stdout.
If
2015-01-30 17:34:36 -05:00
.Fl f
is not set and
.Ar name
is not a symbolic link,
2015-01-30 17:34:36 -05:00
.Nm
exits with a nonzero exit code without printing anything.
2015-01-30 17:34:36 -05:00
.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.
2015-01-30 17:34:36 -05:00
.It Fl n
Do not output the trailing newline.
2015-01-30 17:34:36 -05:00
.El
.Sh SEE ALSO
.Xr readlink 2 ,
.Xr realpath 3