2015-11-16 11:28:36 -05:00
|
|
|
.Dd 2015-11-16
|
2015-01-31 08:20:02 -05:00
|
|
|
.Dt READLINK 1
|
2015-01-31 14:37:03 -05:00
|
|
|
.Os sbase
|
2015-01-30 17:34:36 -05:00
|
|
|
.Sh NAME
|
|
|
|
.Nm readlink
|
2015-01-31 18:43:43 -05:00
|
|
|
.Nd print symbolic link target or canonical file name
|
2015-01-30 17:34:36 -05:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2015-11-16 11:28:36 -05:00
|
|
|
.Op Fl f
|
2015-03-20 17:09:47 -04:00
|
|
|
.Op Fl n
|
|
|
|
.Ar path
|
2015-01-30 17:34:36 -05:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-03-20 17:09:47 -04:00
|
|
|
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
|
2015-03-20 17:09:47 -04:00
|
|
|
exits with a non-zero return value.
|
2015-01-30 17:34:36 -05:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
2015-11-16 11:28:36 -05:00
|
|
|
.It Fl f
|
2015-01-31 18:43:43 -05:00
|
|
|
Canonicalize
|
2015-11-16 11:28:36 -05:00
|
|
|
.Ar path ,
|
2015-03-20 17:09:47 -04:00
|
|
|
which needn't be a symlink,
|
|
|
|
by recursively following every symlink in its path components.
|
2015-01-30 17:34:36 -05:00
|
|
|
.It Fl n
|
2015-03-20 17:09:47 -04:00
|
|
|
Do not print the terminating newline.
|
2015-01-30 17:34:36 -05:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr readlink 2 ,
|
|
|
|
.Xr realpath 3
|