summaryrefslogtreecommitdiffstats
path: root/usr.bin/stat
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2010-12-05 21:17:02 +0000
committerdougb <dougb@FreeBSD.org>2010-12-05 21:17:02 +0000
commit6d976ebbc4460b57f3c57ac699488addc0550bc1 (patch)
treeae90479751348c818a55e53080365aee89a9fc9b /usr.bin/stat
parent392be70ea51a44fe9de58fd2c1fb80b8e62d1919 (diff)
downloadFreeBSD-src-6d976ebbc4460b57f3c57ac699488addc0550bc1.zip
FreeBSD-src-6d976ebbc4460b57f3c57ac699488addc0550bc1.tar.gz
Bring in the update from NetBSD 1.19, the documentation of readlink -f
"PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn't grok -f, and there's no alternative (+fix) Patch applied with minor tweak (%y -> %R, as it was already taken) plus some nits from myself. Thanks!" Obtained from: elad@NetBSD.org
Diffstat (limited to 'usr.bin/stat')
-rw-r--r--usr.bin/stat/stat.121
1 files changed, 17 insertions, 4 deletions
diff --git a/usr.bin/stat/stat.1 b/usr.bin/stat/stat.1
index 0ae0b7c..aeff9ba 100644
--- a/usr.bin/stat/stat.1
+++ b/usr.bin/stat/stat.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: stat.1,v 1.11 2003/05/08 13:07:10 wiz Exp $
+.\" $NetBSD: stat.1,v 1.19 2006/10/07 10:41:50 elad Exp $
.\"
.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -43,7 +43,7 @@
.Op Fl t Ar timefmt
.Op Ar
.Nm readlink
-.Op Fl n
+.Op Fl fn
.Op Ar
.Sh DESCRIPTION
The
@@ -60,9 +60,20 @@ displays information about the file descriptor for standard input.
When invoked as
.Nm readlink ,
only the target of the symbolic link is printed.
-If the given argument is not a symbolic link,
+If the given argument is not a symbolic link and the
+.Fl f
+option is not specified,
.Nm readlink
will print nothing and exit with an error.
+If the
+.Fl f
+option is specified, the output is canonicalized by following every symlink
+in every component of the given path recursively.
+.Nm readlink
+will resolve both absolute and relative paths, and return the absolute pathname
+corresponding to
+.Ar file .
+In this case, the argument does not need to be a symbolic link.
.Pp
The information displayed is obtained by calling
.Xr lstat 2
@@ -374,13 +385,15 @@ User defined flags for
Inode generation number.
.El
.Pp
-The following four field specifiers are not drawn directly from the
+The following five field specifiers are not drawn directly from the
data in
.Vt "struct stat" ,
but are:
.Bl -tag -width indent
.It Cm N
The name of the file.
+.It Cm R
+The absolute pathname corresponding to the file.
.It Cm T
The file type, either as in
.Nm ls Fl F
OpenPOWER on IntegriCloud