Add the new standard EXIT STATUS section where appropriate.

Sort standard sections in the (documented) preferred order.
This commit is contained in:
Ruslan Ermilov 2005-01-16 16:41:59 +00:00
parent 2d7142bf0d
commit 6fca4c7c3f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140353
26 changed files with 223 additions and 223 deletions

View file

@ -103,7 +103,7 @@ characters (with the high bit set) are printed as
.Ql M-
(for meta) followed by the character for the low 7 bits.
.El
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
The command:

View file

@ -133,7 +133,7 @@ In addition, these options override each other and the
command's actions are determined by the last one specified.
.Pp
You can use "ls -lo" to see the flags of existing files.
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr ls 1 ,

View file

@ -267,6 +267,11 @@ Element supports passing media (exporting) to an outside human operator.
.It INENAB
Element supports receiving media (importing) from an outside human operator.
.El
.Sh FILES
.Bl -tag -width /dev/ch0 -compact
.It Pa /dev/ch0
default changer device
.El
.Sh EXAMPLES
.Bl -tag -width indent
.It Li chio move slot 3 drive 0
@ -279,11 +284,6 @@ location in the rack.
.It Li chio setpicker 2
Configure the changer to use picker 2 (third picker) for operations.
.El
.Sh FILES
.Bl -tag -width /dev/ch0 -compact
.It Pa /dev/ch0
default changer device
.El
.Sh SEE ALSO
.Xr mt 1 ,
.Xr mount 8

View file

@ -104,7 +104,7 @@ command's actions are determined by the last one specified.
.Pp
Only the owner of a file or the super-user is permitted to change
the mode of a file.
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh MODES
Modes may be absolute or symbolic.
@ -304,10 +304,6 @@ clear all mode bits for group and others.
.It Li g=u-w
set the group bits equal to the user bits, but clear the group write bit.
.El
.Sh BUGS
There's no
.Ar perm
option for the naughty bits.
.Sh COMPATIBILITY
The
.Fl v
@ -340,3 +336,7 @@ A
.Nm
command appeared in
.At v1 .
.Sh BUGS
There's no
.Ar perm
option for the naughty bits.

View file

@ -235,7 +235,7 @@ argument for
.Xr stty 1 )
signal, the current input and output file and the percentage complete
will be written to the standard output.
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh COMPATIBILITY
Historic versions of the

View file

@ -282,6 +282,33 @@ Everything but the minutes is optional.
.Pp
Time changes for Daylight Saving Time, standard time, leap seconds,
and leap years are handled automatically.
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
.Bl -tag -width Ds
.It Ev TZ
The timezone to use when displaying dates.
The normal format is a pathname relative to
.Pa /usr/share/zoneinfo .
For example, the command
.Dq TZ=America/Los_Angeles date
displays the current time in California.
See
.Xr environ 7
for more information.
.El
.Sh FILES
.Bl -tag -width /var/log/messages -compact
.It Pa /var/log/wtmp
record of date resets and time changes
.It Pa /var/log/messages
record of the user setting the time
.El
.Sh EXIT STATUS
The
.Nm
utility exits 0 on success, 1 if unable to set the date, and 2
if able to set the local date, but unable to set it globally.
.Sh EXAMPLES
The command:
.Pp
@ -359,45 +386,7 @@ Finally the command:
can be used to parse the output from
.Nm
and express it in Epoch time.
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
.Bl -tag -width Ds
.It Ev TZ
The timezone to use when displaying dates.
The normal format is a pathname relative to
.Pa /usr/share/zoneinfo .
For example, the command
.Dq TZ=America/Los_Angeles date
displays the current time in California.
See
.Xr environ 7
for more information.
.El
.Sh FILES
.Bl -tag -width /var/log/messages -compact
.It Pa /var/log/wtmp
record of date resets and time changes
.It Pa /var/log/messages
record of the user setting the time
.El
.Sh SEE ALSO
.Xr gettimeofday 2 ,
.Xr strftime 3 ,
.Xr strptime 3 ,
.Xr utmp 5 ,
.Xr timed 8
.Rs
.%T "TSP: The Time Synchronization Protocol for UNIX 4.3BSD"
.%A R. Gusella
.%A S. Zatti
.Re
.Sh DIAGNOSTICS
The
.Nm
utility exits 0 on success, 1 if unable to set the date, and 2
if able to set the local date, but unable to set it globally.
.Pp
Occasionally, when
.Xr timed 8
synchronizes the time on many hosts, the setting of a new time value may
@ -414,6 +403,17 @@ between
and
.Xr timed 8
fails.
.Sh SEE ALSO
.Xr gettimeofday 2 ,
.Xr strftime 3 ,
.Xr strptime 3 ,
.Xr utmp 5 ,
.Xr timed 8
.Rs
.%T "TSP: The Time Synchronization Protocol for UNIX 4.3BSD"
.%A R. Gusella
.%A S. Zatti
.Re
.Sh STANDARDS
The
.Nm

View file

@ -373,6 +373,8 @@ be written to the standard error output
in the same format as the standard completion message and
.Nm
will exit.
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
Check that a disk drive contains no bad blocks:
.Pp
@ -390,8 +392,6 @@ Remove parity bit from a file:
Check for (even) parity errors on a file:
.Pp
.Dl "dd if=file conv=pareven | cmp -x - file"
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
.Xr cp 1 ,
.Xr mt 1 ,

View file

@ -147,13 +147,6 @@ If the environment variable
.Ev BLOCKSIZE
is set, the block counts will be displayed in units of that size block.
.El
.Sh BUGS
The
.Fl n
flag is ignored if a file or file system is specified.
Also, if a mount
point is not accessible by the user, it is possible that the file system
information could be stale.
.Sh SEE ALSO
.Xr lsvfs 1 ,
.Xr quota 1 ,
@ -169,3 +162,10 @@ A
.Nm
command appeared in
.At v1 .
.Sh BUGS
The
.Fl n
flag is ignored if a file or file system is specified.
Also, if a mount
point is not accessible by the user, it is possible that the file system
information could be stale.

View file

@ -77,7 +77,7 @@ command which is similar or identical to this utility.
Consult the
.Xr builtin 1
manual page.
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr builtin 1 ,

View file

@ -921,39 +921,6 @@ the file to which
.Nm
attempts to write the buffer if the terminal hangs up
.El
.Sh SEE ALSO
.Xr bdes 1 ,
.Xr sed 1 ,
.Xr sh 1 ,
.Xr vi 1 ,
.Xr regex 3
.Pp
USD:12-13
.Rs
.%A B. W. Kernighan
.%A P. J. Plauger
.%B Software Tools in Pascal
.%O Addison-Wesley
.%D 1981
.Re
.Sh LIMITATIONS
The
.Nm
utility processes
.Ar file
arguments for backslash escapes, i.e., in a filename,
any characters preceded by a backslash (\\) are
interpreted literally.
.Pp
If a text (non-binary) file is not terminated by a newline character,
then
.Nm
appends one on reading/writing it.
In the case of a binary file,
.Nm
does not append a newline on reading/writing.
.Pp
per line overhead: 4 ints
.Sh DIAGNOSTICS
When an error occurs,
.Nm
@ -994,6 +961,39 @@ or edit another file before writing a modified buffer
results in an error.
If the command is entered a second time, it succeeds,
but any changes to the buffer are lost.
.Sh SEE ALSO
.Xr bdes 1 ,
.Xr sed 1 ,
.Xr sh 1 ,
.Xr vi 1 ,
.Xr regex 3
.Pp
USD:12-13
.Rs
.%A B. W. Kernighan
.%A P. J. Plauger
.%B Software Tools in Pascal
.%O Addison-Wesley
.%D 1981
.Re
.Sh LIMITATIONS
The
.Nm
utility processes
.Ar file
arguments for backslash escapes, i.e., in a filename,
any characters preceded by a backslash (\\) are
interpreted literally.
.Pp
If a text (non-binary) file is not terminated by a newline character,
then
.Nm
appends one on reading/writing it.
In the case of a binary file,
.Nm
does not append a newline on reading/writing.
.Pp
per line overhead: 4 ints
.Sh HISTORY
An
.Nm

View file

@ -180,6 +180,18 @@ also enables compatibility mode.
.It Ev EXPR_COMPAT
If set, enables compatibility mode.
.El
.Sh EXIT STATUS
The
.Nm
utility exits with one of the following values:
.Bl -tag -width indent -compact
.It 0
the expression is neither an empty string nor 0.
.It 1
the expression is an empty string or 0.
.It 2
the expression is invalid.
.El
.Sh EXAMPLES
.Bl -bullet
.It
@ -236,18 +248,6 @@ For portability to older systems, however, a more complicated command
is required:
.Dl "expr \e( \*qX$a\*q \&: \*q.*\*q \e) - 1"
.El
.Sh DIAGNOSTICS
The
.Nm
utility exits with one of the following values:
.Bl -tag -width indent -compact
.It 0
the expression is neither an empty string nor 0.
.It 1
the expression is an empty string or 0.
.It 2
the expression is invalid.
.El
.Sh SEE ALSO
.Xr sh 1 ,
.Xr test 1 ,

View file

@ -81,6 +81,8 @@ then
reads a list of pathnames, each terminated by one newline character,
from the standard input.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
.Dl getfacl /
.Pp
@ -92,8 +94,6 @@ Retrieve ACL for the directory
Retrieve the default ACL for the directory
.Pa / ,
if any.
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
.Xr setfacl 1 ,
.Xr acl 3 ,

View file

@ -115,6 +115,8 @@ command which is similar or identical to this utility.
Consult the
.Xr builtin 1
manual page.
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
Terminate
the processes with pids 142 and 157:
@ -130,8 +132,6 @@ to the process with pid 507:
Terminate the process group with pgid 117:
.Pp
.Dl "kill -- -117"
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
.Xr builtin 1 ,
.Xr csh 1 ,

View file

@ -168,13 +168,6 @@ No options may be supplied in this simple mode of operation,
which performs a
.Xr link 2
operation using the two passed arguments.
.Sh SEE ALSO
.Xr link 2 ,
.Xr lstat 2 ,
.Xr readlink 2 ,
.Xr stat 2 ,
.Xr symlink 2 ,
.Xr symlink 7
.Sh COMPATIBILITY
The
.Fl h ,
@ -186,6 +179,13 @@ options are non-standard and their use in scripts is not recommended.
They are provided solely for compatibility with other
.Nm
implementations.
.Sh SEE ALSO
.Xr link 2 ,
.Xr lstat 2 ,
.Xr readlink 2 ,
.Xr stat 2 ,
.Xr symlink 2 ,
.Xr symlink 7
.Sh STANDARDS
The
.Nm

View file

@ -439,23 +439,6 @@ utility does not show the actual ACL;
use
.Xr getfacl 1
to do this.
.Sh EXAMPLES
The following is how to do an
.Nm
listing sorted by size (and shows why
.Nm
does not need a separate option for this):
.Pp
.Dl "ls -l | sort -n +4"
.Pp
Additionally, the
.Fl r
flag to
.Xr sort 1
may be used
to get the results sorted from largest to smallest (a reverse sort).
.Sh DIAGNOSTICS
.Ex -std
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
@ -635,6 +618,23 @@ See
.Xr environ 7
for more information.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
The following is how to do an
.Nm
listing sorted by size (and shows why
.Nm
does not need a separate option for this):
.Pp
.Dl "ls -l | sort -n +4"
.Pp
Additionally, the
.Fl r
flag to
.Xr sort 1
may be used
to get the results sorted from largest to smallest (a reverse sort).
.Sh COMPATIBILITY
The group field is now automatically included in the long listing for
files in order to be compatible with the

View file

@ -84,14 +84,14 @@ Be verbose when creating directories, listing them as they are created.
.El
.Pp
The user must have write permission in the parent directory.
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr rmdir 1
.Sh COMPATIBILITY
The
.Fl v
option is non-standard and its use in scripts is not recommended.
.Sh SEE ALSO
.Xr rmdir 1
.Sh STANDARDS
The
.Nm

View file

@ -138,18 +138,18 @@ rm -f destination_path && \e
cp -pRP source_file destination && \e
rm -rf source_file
.Ed
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr cp 1 ,
.Xr rm 1 ,
.Xr symlink 7
.Sh COMPATIBILITY
The
.Fl n
and
.Fl v
options are non-standard and their use in scripts is not recommended.
.Sh SEE ALSO
.Xr cp 1 ,
.Xr rm 1 ,
.Xr symlink 7
.Sh STANDARDS
The
.Nm

View file

@ -251,7 +251,7 @@ List filenames as they are copied.
.It Ev TMPDIR
Path in which to store temporary files.
.El
.Sh DIAGNOSTICS
.Sh EXIT STATUS
The
.Nm
utility will exit with one of the following values:

View file

@ -1049,6 +1049,16 @@ options are specified along with the
.Fl n
option, a file is not considered selected unless it is newer
than the file to which it is compared.
.Sh EXIT STATUS
The
.Nm
utility will exit with one of the following values:
.Bl -tag -width 2n
.It 0
All files were processed successfully.
.It 1
An error occurred.
.El
.Sh EXAMPLES
The command:
.Dl "pax -w -f /dev/sa0 ."
@ -1099,59 +1109,7 @@ will update (and list) only those files in the destination directory
which are older (less recent inode change or file modification times) than
files with the same name found in the source file tree
.Pa home .
.Sh STANDARDS
The
.Nm
utility is a superset of the
.St -p1003.2
standard.
The options
.Fl z ,
.Fl B ,
.Fl D ,
.Fl E ,
.Fl G ,
.Fl H ,
.Fl L ,
.Fl P ,
.Fl T ,
.Fl U ,
.Fl Y ,
.Fl Z ,
the archive formats
.Ar bcpio ,
.Ar sv4cpio ,
.Ar sv4crc ,
.Ar tar ,
and the flawed archive handling during
.Ar list
and
.Ar read
operations are extensions to the
.Tn POSIX
standard.
.Sh SEE ALSO
.Xr cpio 1 ,
.Xr tar 1
.Sh HISTORY
The
.Nm
utility appeared in
.Bx 4.4 .
.Sh AUTHORS
.An Keith Muller
at the University of California, San Diego
.Sh DIAGNOSTICS
The
.Nm
utility will exit with one of the following values:
.Bl -tag -width 2n
.It 0
All files were processed successfully.
.It 1
An error occurred.
.El
.Pp
Whenever
.Nm
cannot create a file or a link when reading an archive or cannot
@ -1187,6 +1145,48 @@ a diagnostic message is written to
and when
.Nm
completes it will exit with a non-zero exit status.
.Sh SEE ALSO
.Xr cpio 1 ,
.Xr tar 1
.Sh STANDARDS
The
.Nm
utility is a superset of the
.St -p1003.2
standard.
The options
.Fl z ,
.Fl B ,
.Fl D ,
.Fl E ,
.Fl G ,
.Fl H ,
.Fl L ,
.Fl P ,
.Fl T ,
.Fl U ,
.Fl Y ,
.Fl Z ,
the archive formats
.Ar bcpio ,
.Ar sv4cpio ,
.Ar sv4crc ,
.Ar tar ,
and the flawed archive handling during
.Ar list
and
.Ar read
operations are extensions to the
.Tn POSIX
standard.
.Sh HISTORY
The
.Nm
utility appeared in
.Bx 4.4 .
.Sh AUTHORS
.An Keith Muller
at the University of California, San Diego
.Sh BUGS
The
.Nm

View file

@ -252,7 +252,7 @@ Default tape device to use instead of
.It Pa /dev/sa0
default archive name
.El
.Sh DIAGNOSTICS
.Sh EXIT STATUS
The
.Nm
utility will exit with one of the following values:

View file

@ -72,19 +72,19 @@ Environment variables used by
.It Ev PWD
Logical current working directory.
.El
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh STANDARDS
The
.Nm
utility conforms to
.St -p1003.1-2001 .
.Sh SEE ALSO
.Xr builtin 1 ,
.Xr cd 1 ,
.Xr csh 1 ,
.Xr sh 1 ,
.Xr getcwd 3
.Sh STANDARDS
The
.Nm
utility conforms to
.St -p1003.1-2001 .
.Sh BUGS
In
.Xr csh 1

View file

@ -55,7 +55,7 @@ and
.Pa /../
in
.Ar path .
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr realpath 3

View file

@ -163,22 +163,6 @@ path reference.
For example:
.Dl rm /home/user/-filename
.Dl rm ./-filename
.Sh SEE ALSO
.Xr chflags 1 ,
.Xr rmdir 1 ,
.Xr undelete 2 ,
.Xr unlink 2 ,
.Xr fts 3 ,
.Xr getopt 3 ,
.Xr symlink 7
.Sh BUGS
The
.Fl P
option assumes that the underlying file system is a fixed-block file
system.
UFS is a fixed-block file system, LFS is not.
In addition, only regular files are overwritten, other types of files
are not.
.Sh COMPATIBILITY
The
.Nm
@ -194,6 +178,14 @@ Also, historical
.Bx
implementations prompted on the standard output,
not the standard error output.
.Sh SEE ALSO
.Xr chflags 1 ,
.Xr rmdir 1 ,
.Xr undelete 2 ,
.Xr unlink 2 ,
.Xr fts 3 ,
.Xr getopt 3 ,
.Xr symlink 7
.Sh STANDARDS
The
.Nm
@ -209,3 +201,11 @@ A
.Nm
command appeared in
.At v1 .
.Sh BUGS
The
.Fl P
option assumes that the underlying file system is a fixed-block file
system.
UFS is a fixed-block file system, LFS is not.
In addition, only regular files are overwritten, other types of files
are not.

View file

@ -231,7 +231,7 @@ ACL entry.
.Pp
Multiple ACL entries specified on the command line are
separated by commas.
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
.Dl setfacl -m u::rwx,g:mail:rw file

View file

@ -66,6 +66,8 @@ character as a decimal point).
This is a non-portable extension, and its use will nearly guarantee that
a shell script will not execute properly on another system.
.Ef
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
To schedule the execution of a command for
.Va x
@ -106,8 +108,6 @@ The script checks every five minutes for the file zzz.rawdata,
when the file is found, then another portion processing
is done courteously by sleeping for 70 seconds in between each
awk job.
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
.Xr nanosleep 2 ,
.Xr sleep 3

View file

@ -583,7 +583,7 @@ Same as the control character
Same as the control character
.Cm reprint .
.El
.Sh DIAGNOSTICS
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr termios 4