1
0
mirror of git://git.suckless.org/sbase synced 2024-12-22 07:01:15 +00:00
sbase/readlink.1

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