diff options
| author | elad <elad@NetBSD.org> | 2006-10-07 10:41:50 +0000 |
|---|---|---|
| committer | elad <elad@NetBSD.org> | 2006-10-07 10:41:50 +0000 |
| commit | 2a7d09e7cd7de4e1aee676cfded730d850693cbd (patch) | |
| tree | bca889a44403636d54f0977bf555f0f54149a784 /usr.bin/stat/stat.1 | |
| parent | e35f1235307d00c047c6011a0f63ba9fb6417f56 (diff) | |
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!
Diffstat (limited to 'usr.bin/stat/stat.1')
| -rw-r--r-- | usr.bin/stat/stat.1 | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/usr.bin/stat/stat.1 b/usr.bin/stat/stat.1 index 01e2618011d..c72075b2893 100644 --- a/usr.bin/stat/stat.1 +++ b/usr.bin/stat/stat.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: stat.1,v 1.18 2005/06/26 10:16:46 wiz Exp $ +.\" $NetBSD: stat.1,v 1.19 2006/10/07 10:41:50 elad Exp $ .\" .\" Copyright (c) 2002-2005 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -34,7 +34,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 23, 2005 +.Dd October 7, 2006 .Dt STAT 1 .Os .Sh NAME @@ -54,7 +54,7 @@ .Op Fl t Ar timefmt .Op Ar .Nm readlink -.Op Fl n +.Op Fl fn .Op Ar .Sh DESCRIPTION The @@ -71,9 +71,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 @@ -379,11 +390,13 @@ 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 struct stat, but are: .Bl -tag -width Ds .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 .Ic ls -F |
