sbase/readlink.1

34 lines
632 B
Groff
Raw Normal View History

.Dd 2015-10-08
.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 e | Fl f | Fl m
.Op Fl n
.Ar path
2015-01-30 17:34:36 -05:00
.Sh DESCRIPTION
.Nm
writes the target of
.Ar path ,
if it is a symbolic link, to stdout.
If not,
2015-01-30 17:34:36 -05:00
.Nm
exits with a non-zero return value.
2015-01-30 17:34:36 -05:00
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl e | Fl f | Fl m
Canonicalize
.Ar name ,
which needn't be a symlink,
by recursively following every symlink in its path components.
All | All but the last | No path components must exist.
2015-01-30 17:34:36 -05:00
.It Fl n
Do not print the terminating newline.
2015-01-30 17:34:36 -05:00
.El
.Sh SEE ALSO
.Xr readlink 2 ,
.Xr realpath 3