From owner-svn-src-all@FreeBSD.ORG Sun Dec 5 22:41:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EAF91065674; Sun, 5 Dec 2010 22:41:58 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D82B8FC0A; Sun, 5 Dec 2010 22:41:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oB5Mfwog011439; Sun, 5 Dec 2010 22:41:58 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oB5MfwmS011437; Sun, 5 Dec 2010 22:41:58 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201012052241.oB5MfwmS011437@svn.freebsd.org> From: Doug Barton Date: Sun, 5 Dec 2010 22:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216218 - head/usr.bin/stat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Dec 2010 22:41:58 -0000 Author: dougb Date: Sun Dec 5 22:41:58 2010 New Revision: 216218 URL: http://svn.freebsd.org/changeset/base/216218 Log: Bring in the following changes from NetBSD: 1.21 "Document the flags displayed by the default format, and mention their short names. From espie@openbsd via jmc@openbsd." 1.24 "Fix three variable names. From Todd T. Fries via Jason McIntyre." Obtained from: wiz@NetBSD.org (previous 2) 1.25 "Be consistent: document the birthtime field of struct stat for the "B" field specifier." Obtained from: reed@NetBSD.org 1.26 "Drop trailing space." Obtained from: wiz@NetBSD.org 1.27 "Since we have st_birthtime in struct stat, it is in default display." Obtained from: enami@NetBSD.org Purposely skipping the following revisions: 1.22 NetBSD-specific change 1.23 Removal of license clauses 3 and 4, already handled by imp in our r203971 Modified: head/usr.bin/stat/stat.1 Modified: head/usr.bin/stat/stat.1 ============================================================================== --- head/usr.bin/stat/stat.1 Sun Dec 5 22:37:01 2010 (r216217) +++ head/usr.bin/stat/stat.1 Sun Dec 5 22:41:58 2010 (r216218) @@ -1,4 +1,4 @@ -.\" $NetBSD: stat.1,v 1.19 2006/10/07 10:41:50 elad Exp $ +.\" $NetBSD: stat.1,v 1.27 2010/03/11 21:37:01 enami Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -68,7 +68,7 @@ will print nothing and exit with an erro If the .Fl f option is specified, the output is canonicalized by following every symlink -in every component of the given path recursively. +in every component of the given path recursively. .Nm readlink will resolve both absolute and relative paths, and return the absolute pathname corresponding to @@ -78,6 +78,24 @@ In this case, the argument does not need The information displayed is obtained by calling .Xr lstat 2 with the given argument and evaluating the returned structure. +The default format displays the +.Fa st_dev , +.Fa st_ino , +.Fa st_mode , +.Fa st_nlink , +.Fa st_uid , +.Fa st_gid , +.Fa st_rdev , +.Fa st_size , +.Fa st_atime , +.Fa st_mtime , +.Fa st_ctime , +.Fa st_birthtime , +.Fa st_blksize , +.Fa st_blocks , +and +.Fa st_flags +fields, in that order. .Pp The options are as follows: .Bl -tag -width indent @@ -354,40 +372,51 @@ A required field specifier, being one of .It Cm d Device upon which .Ar file -resides. +resides +.Pq Fa st_dev . .It Cm i .Ar file Ns 's -inode number. +inode number +.Pq Fa st_ino . .It Cm p -File type and permissions. +File type and permissions +.Pq Fa st_mode . .It Cm l Number of hard links to -.Ar file . +.Ar file +.Pq Fa st_nlink . .It Cm u , g User ID and group ID of .Ar file Ns 's -owner. +owner +.Pq Fa st_uid , st_gid . .It Cm r -Device number for character and block device special files. +Device number for character and block device special files +.Pq Fa st_rdev . .It Cm a , m , c , B The time .Ar file was last accessed or modified, or when the inode was last changed, or -the birth time of the inode. +the birth time of the inode +.Pq Fa st_atime , st_mtime , st_ctime , st_birthtime . .It Cm z The size of .Ar file -in bytes. +in bytes +.Pq Fa st_size . .It Cm b Number of blocks allocated for -.Ar file . +.Ar file +.Pq Fa st_blocks . .It Cm k -Optimal file system I/O operation block size. +Optimal file system I/O operation block size +.Pq Fa st_blksize . .It Cm f User defined flags for .Ar file . .It Cm v -Inode generation number. +Inode generation number +.Pq Fa st_gen . .El .Pp The following five field specifiers are not drawn directly from the