2015-01-31 23:43:43 +00:00
|
|
|
.Dd January 31, 2015
|
2015-01-31 13:20:02 +00:00
|
|
|
.Dt READLINK 1
|
2015-01-31 19:37:03 +00:00
|
|
|
.Os sbase
|
2015-01-30 22:34:36 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm readlink
|
2015-01-31 23:43:43 +00:00
|
|
|
.Nd print symbolic link target or canonical file name
|
2015-01-30 22:34:36 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl fn
|
2015-01-31 23:43:43 +00:00
|
|
|
.Ar name
|
2015-01-30 22:34:36 +00:00
|
|
|
.Sh DESCRIPTION
|
2015-01-31 23:43:43 +00:00
|
|
|
If
|
|
|
|
.Ar name
|
|
|
|
is a symbolic link,
|
2015-01-30 22:34:36 +00:00
|
|
|
.Nm
|
2015-01-31 23:43:43 +00:00
|
|
|
writes its target to stdout.
|
|
|
|
If
|
2015-01-30 22:34:36 +00:00
|
|
|
.Fl f
|
2015-01-31 23:43:43 +00:00
|
|
|
is not set and
|
|
|
|
.Ar name
|
|
|
|
is not a symbolic link,
|
2015-01-30 22:34:36 +00:00
|
|
|
.Nm
|
2013-06-15 14:17:57 +00:00
|
|
|
exits with a nonzero exit code without printing anything.
|
2015-01-30 22:34:36 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl f
|
2015-01-31 23:43:43 +00:00
|
|
|
Canonicalize
|
|
|
|
.Ar name ,
|
|
|
|
which does not need to be a symlink,
|
|
|
|
by recursively following every symlink in its components.
|
2015-01-30 22:34:36 +00:00
|
|
|
.It Fl n
|
2013-06-15 14:17:57 +00:00
|
|
|
Do not output the trailing newline.
|
2015-01-30 22:34:36 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr readlink 2 ,
|
|
|
|
.Xr realpath 3
|