Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/stat Formatting, grammar, spelling, and other improv...
details: https://anonhg.NetBSD.org/src/rev/48d7c849b03c
branches: trunk
changeset: 526227:48d7c849b03c
user: wiz <wiz%NetBSD.org@localhost>
date: Sun Apr 28 17:44:43 2002 +0000
description:
Formatting, grammar, spelling, and other improvements.
diffstat:
usr.bin/stat/stat.1 | 103 +++++++++++++++++++++------------------------------
1 files changed, 42 insertions(+), 61 deletions(-)
diffs (268 lines):
diff -r 2e61763a42a4 -r 48d7c849b03c usr.bin/stat/stat.1
--- a/usr.bin/stat/stat.1 Sun Apr 28 17:21:58 2002 +0000
+++ b/usr.bin/stat/stat.1 Sun Apr 28 17:44:43 2002 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: stat.1,v 1.2 2002/04/28 17:21:33 atatat Exp $
+.\" $NetBSD: stat.1,v 1.3 2002/04/28 17:44:43 wiz Exp $
.\"
.\" Copyright (c) 2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -35,13 +35,13 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd April 24, 2002
-.Dt stat 1
+.Dt STAT 1
.Os
.Sh NAME
.Nm stat
.Nd display file status
.Sh SYNOPSIS
-.Nm ""
+.Nm
.Op Fl FLn
.Oo
.Fl f Ar format |
@@ -57,14 +57,14 @@
.Nm
utility displays information about the file pointed to by
.Ar file .
-Read, write or execute permission of the named file is not required, but
+Read, write or execute permissions of the named file are not required, but
all directories listed in the path name leading to the file must be
searchable. If no argument is given,
.Nm
displays information about the file descriptor for standard input.
.Pp
The information displayed is obtained by calling
-.Fn lstat
+.Xr lstat 2
with the given argument and evaluating the returned structure.
.Pp
The options are as follows:
@@ -84,7 +84,7 @@
.Xr stat 2
instead of
.Xr lstat 2 .
-The imformation reported by
+The information reported by
.Nm
will refer to the target of
.Ar file ,
@@ -110,11 +110,11 @@
Display information in a more verbose way as known from some Linux
distributions.
.It Fl t Ar timefmt
-Display timestamps using the specified format. This format is
+Display timestamps using the specified format. This format is
passed directly to
.Xr strftime 3 .
.El
-.Sh FORMATS
+.Ss FORMATS
Format strings are similar to
.Xr printf 3
formats in that they start with
@@ -136,7 +136,7 @@
.It Cm #
Selects an alternate output form for octal and hexadecimal output.
Non-zero octal output will have a leading zero, and non-zero
-hexadecimal output will have `0x' predended to it.
+hexadecimal output will have ``0x'' prepended to it.
.It Cm +
Asserts that a sign indicating whether a number is positive or negative
should always be printed. Non-negative numbers are not usually printed
@@ -163,7 +163,7 @@
the number of digits to appear after the decimal point in floating point
output, or the minimum number of digits to appear in numeric output.
.It Cm fmt
-And optional output format specifier which is one of
+An optional output format specifier which is one of
.Cm D ,
.Cm O ,
.Cm U ,
@@ -175,9 +175,11 @@
output, hexadecimal output, floating point output, and string output,
respectively. Some output formats do not apply to all fields.
Floating point output only applies to timespec fields (the
-.Cm a , m ,
+.Cm a ,
+.Cm m ,
and
-.Cm c fields).
+.Cm c
+fields).
.Pp
The special output specifier
.Cm S
@@ -198,11 +200,11 @@
.It Cm N
Displays the name of
.Ar file .
-.It Cm Y
+.It Cm T
Displays the type of
.Ar file .
.It Cm Y
-Insert a `` -> '' into the output. Note that the default output format
+Insert a `` -\*[Gt] '' into the output. Note that the default output format
for
.Cm Y
is a string, but if specified explicitly, these four characters are
@@ -242,7 +244,7 @@
.Cm L
for this is optional).
.It Cm M
-``Middle'' -- specifies the middle bits for permissions from the
+``Middle'' -- specifies the middle bits for permissions from the
string output form of
.Cm p .
.El
@@ -254,7 +256,8 @@
.Ar file
resides.
.It Cm i
-.Ar file Ap s inode number.
+.Ar file Ap s
+inode number.
.It Cm p
File type and permissions.
.It Cm l
@@ -262,7 +265,8 @@
.Ar file .
.It Cm u , g
User-id and group-id of
-.Ar file Ap s owner.
+.Ar file Ap s
+owner.
.It Cm r
Device number for character and block device special files.
.It Cm a , m , c
@@ -327,18 +331,16 @@
.Cm S .
.Sh EXIT STATUS
.Nm
-exits 0 on success, and >0 if an error occurred.
+exits 0 on success, and \*[Gt]0 if an error occurred.
.Sh EXAMPLES
Given a symbolic link ``foo'' that points from /tmp/foo to /, you would use
.Nm
as follows:
.Bd -literal -offset indent
-stat -F /tmp/foo
-.Br
-lrwxrwxrwx 1 jschauma cs 1 Apr 24 16:37:28 2002 /tmp/foo@ -> /
-.Pp
-stat -LF /tmp/foo
-.Br
+\*[Gt] stat -F /tmp/foo
+lrwxrwxrwx 1 jschauma cs 1 Apr 24 16:37:28 2002 /tmp/foo@ -\*[Gt] /
+
+\*[Gt] stat -LF /tmp/foo
lrwxrwxrwx 16 root wheel 512 Apr 19 10:57:54 2002 /tmp/foo/
.Ed
.Pp
@@ -346,20 +348,14 @@
.Fl s
flag as follows:
.Bd -literal -offset indent
-> csh
-.Br
+\*[Gt] csh
% eval set `stat -s .cshrc`
-.Br
% echo $st_size $st_mtimespec
-.Br
1148 1015432481
-.Pp
-> sh
-.Br
+
+\*[Gt] sh
$ eval $(stat -s .profile)
-.Br
$ echo $st_size $st_mtimespec
-.Br
1148 1015432481
.Ed
.Pp
@@ -367,14 +363,10 @@
file is a symbolic link, you could use the following format:
.Bd -literal -offset indent
$ stat -f "%N: %HT%SY" /tmp/*
-.Br
-/tmp/bar: Symbolic Link -> /tmp/foo
-.Br
+/tmp/bar: Symbolic Link -\*[Gt] /tmp/foo
/tmp/output25568: Regular File
-.Br
/tmp/blah: Directory
-.Br
-/tmp/foo: Symbolic Link -> /
+/tmp/foo: Symbolic Link -\*[Gt] /
.Ed
.Pp
In order to get a list of the devices, their types and the major and minor
@@ -382,45 +374,31 @@
following format:
.Bd -literal -offset indent
stat -f "Name: %N%n%tType: %HT%n%tMajor: %Hr%n%tMinor: %Lr%n%n" /dev/*
-.Br
[...]
-.Br
Name: /dev/wt8
-.Br
Type: Block Device
-.Br
Major: 3
-.Br
Minor: 8
-.Br
-.Br
+
Name: /dev/zero
-.Br
Type: Character Device
-.Br
Major: 2
-.Br
Minor: 12
-.Br
.Ed
.Pp
In order to determine the permissions set on a file separately, you could use
the following format:
.Bd -literal -offset indent
-stat -f "%Sp -> owner=%SHp group=%SMp other=%SLp" .
-.Br
-drwxr-xr-x -> owner=rwx group=r-x other=r-x
+\*[Gt] stat -f "%Sp -\*[Gt] owner=%SHp group=%SMp other=%SLp" .
+drwxr-xr-x -\*[Gt] owner=rwx group=r-x other=r-x
.Ed
.Pp
-In order to determine the three files that have been modified most recently, you
-could use the following format:
+In order to determine the three files that have been modified most recently,
+you could use the following format:
.Bd -literal -offset indent
-stat -f "%m%t%Sm %N" /tmp/* | sort -rn | head -3 | cut -f2-
-.Br
+\*[Gt] stat -f "%m%t%Sm %N" /tmp/* | sort -rn | head -3 | cut -f2-
Apr 25 11:47:00 2002 /tmp/blah
-.Br
Apr 25 10:36:34 2002 /tmp/bar
-.Br
Apr 24 16:47:35 2002 /tmp/foo
.Ed
.Sh SEE ALSO
@@ -439,5 +417,8 @@
.Sh AUTHORS
The
.Nm
-utility was written by Andrew Brown <atatat%netbsd.org@localhost>. This man page
-was written by Jan Schaumann <jschauma%netbsd.org@localhost>.
+utility was written by Andrew Brown
+.Aq atatat%netbsd.org@localhost .
+This man page
+was written by Jan Schaumann
+.Aq jschauma%netbsd.org@localhost .
Home |
Main Index |
Thread Index |
Old Index