manpages: fix options and examples

This commit is contained in:
David van Moolenbroek 2012-03-31 23:44:29 +02:00
parent 8c4cdbd3c5
commit 4eddbf774c
85 changed files with 1089 additions and 366 deletions

View file

@ -15,7 +15,9 @@ acksize \- print text, data, and bss size of a program
# \\$2
..
.SH EXAMPLES
.EX "acksize file" "Print the size of \fIfile\fP"
.TP 20
.B acksize file
# Print the size of \fIfile\fP
.SH DESCRIPTION
.PP
The text, data, bss, and total sizes for each argument are printed.

View file

@ -15,9 +15,15 @@ at \- execute commands at a later time
# \\$2
..
.SH EXAMPLES
.EX "at 2315 Jan 31 myfile" "Myfile executed Jan 31 at 11:15 pm"
.EX "at 0900" "Job input read from \fIstdin\fR"
.EX "at 0711 4 29 " "Read from \fIstdin\fR, exec on April 29"
.TP 20
.B at 2315 Jan 31 myfile
# Myfile executed Jan 31 at 11:15 pm
.TP 20
.B at 0900
# Job input read from \fIstdin\fR
.TP 20
.B at 0711 4 29
# Read from \fIstdin\fR, exec on April 29
.SH DESCRIPTION
.PP
\fBAt\fR prepares a file to be executed later at the specified time by

View file

@ -15,7 +15,9 @@ banner \- print a banner
# \\$2
..
.SH EXAMPLES
.EX "banner happy birthday" "Print a banner saying happy birthday"
.TP 20
.B banner happy birthday
# Print a banner saying happy birthday
.SH DESCRIPTION
.PP
\fIBanner\fR prints its arguments on \fIstdout\fR using a matrix

View file

@ -16,9 +16,15 @@ basename, dirname \- strip off file prefixes and suffixes
# \\$2
..
.SH EXAMPLES
.EX "basename /user/ast/file.c" "Strips path to yield \fIfile.c\fP"
.EX "basename /user/file.c .c" "Strips path and \fI.c\fP to yield \fIfile\fP"
.EX "dirname /user/file.c" "Strips basename to yield \fI/user\fP"
.TP 20
.B basename /user/ast/file.c
# Strips path to yield \fIfile.c\fP
.TP 20
.B basename /user/file.c .c
# Strips path and \fI.c\fP to yield \fIfile\fP
.TP 20
.B dirname /user/file.c
# Strips basename to yield \fI/user\fP
.SH DESCRIPTION
.PP
.I Basename

View file

@ -15,7 +15,9 @@ cal \- print a calendar
# \\$2
..
.SH EXAMPLES
.EX "cal 3 1992" "Print March 1992"
.TP 20
.B cal 3 1992
# Print March 1992
.SH DESCRIPTION
.PP
\fICal\fR prints a calendar for a month or year. The year can be

View file

@ -15,10 +15,16 @@ cdiff \- context diff
# \\$2
..
.SH OPTIONS
.FL "\-c" "Provide \fIn\fR lines of context"
.TP 5
.B \-c
# Provide \fIn\fR lines of context
.SH EXAMPLES
.EX "cdiff old new >f" "Write context diff on \fIf\fR"
.EX "cdiff \-c1 old new >f" "Use only 1 line of context"
.TP 20
.B cdiff old new >f
# Write context diff on \fIf\fR
.TP 20
.B cdiff \-c1 old new >f
# Use only 1 line of context
.SH DESCRIPTION
.PP
\fICdiff\fR produces a context diff by first running \fIdiff\fR and then

View file

@ -15,10 +15,16 @@ chgrp \- change group
# \\$2
..
.SH OPTIONS
.FL "\-R" "Change directory hierarchies"
.TP 5
.B \-R
# Change directory hierarchies
.SH EXAMPLES
.EX "chgrp system file1 file2" "Make \fIsystem\fR the group of the files"
.EX "chrgp \-R other dir1" "Make \fIother\fR the group of all files below dir1"
.TP 20
.B chgrp system file1 file2
# Make \fIsystem\fR the group of the files
.TP 20
.B chrgp \-R other dir1
# Make \fIother\fR the group of all files below dir1
.SH DESCRIPTION
.PP
The group field (and optionally owner field) of the named files is changed to

View file

@ -15,13 +15,25 @@ chmod \- change access mode for files
# \\$2
..
.SH OPTIONS
.FL "\-R" "Change hierarchies recursively"
.TP 5
.B \-R
# Change hierarchies recursively
.SH EXAMPLES
.EX "chmod 755 file" "Owner: rwx Group: r\-x Others: r\-x"
.EX "chmod +x file1 file2" "Make \fIfile1\fR and \fIfile2\fR executable"
.EX "chmod a\-w file" "Make \fIfile\fR read only"
.EX "chmod u+s file" "Turn on SETUID for \fIfile\fR"
.EX "chmod \-R o+w dir" "Allow writing for all files in dir"
.TP 20
.B chmod 755 file
# Owner: rwx Group: r\-x Others: r\-x
.TP 20
.B chmod +x file1 file2
# Make \fIfile1\fR and \fIfile2\fR executable
.TP 20
.B chmod a\-w file
# Make \fIfile\fR read only
.TP 20
.B chmod u+s file
# Turn on SETUID for \fIfile\fR
.TP 20
.B chmod \-R o+w dir
# Allow writing for all files in dir
.SH DESCRIPTION
.PP
The given mode is applied to each file in the file list. If the \fB\-R\fR

View file

@ -15,8 +15,12 @@ cksum \- display file checksum and size
# \\$2
..
.SH EXAMPLES
.EX "cksum" "Display CRC and size of \fIstdin\fR"
.EX "cksum *.c" "Display CRC and size of \fI.c\fP files"
.TP 20
.B cksum
# Display CRC and size of \fIstdin\fR
.TP 20
.B cksum *.c
# Display CRC and size of \fI.c\fP files
.SH DESCRIPTION
.PP
.I Cksum

View file

@ -15,11 +15,19 @@ cmp \- compare two files
# \\$2
..
.SH OPTIONS
.FL "\-l" "Loud mode. Print bytes that differ (in octal)"
.FL "\-s" "Silent mode. Print nothing, just return exit status"
.TP 5
.B \-l
# Loud mode. Print bytes that differ (in octal)
.TP 5
.B \-s
# Silent mode. Print nothing, just return exit status
.SH EXAMPLES
.EX "cmp file1 file2" "Tell whether the files are the same"
.EX "cmp \-l file1 file2" "Print all corresponding bytes that differ"
.TP 20
.B cmp file1 file2
# Tell whether the files are the same
.TP 20
.B cmp \-l file1 file2
# Print all corresponding bytes that differ
.SH DESCRIPTION
.PP
Two files are compared.

View file

@ -15,12 +15,22 @@ comm \- print lines common to two sorted files
# \\$2
..
.SH OPTIONS
.FL "\-1" "Suppress column 1 (lines present only in \fIfile1\fP)"
.FL "\-2" "Suppress column 2 (lines present only in \fIfile2\fP)"
.FL "\-3" "Suppress column 3 (lines present in both files)"
.TP 5
.B \-1
# Suppress column 1 (lines present only in \fIfile1\fP)
.TP 5
.B \-2
# Suppress column 2 (lines present only in \fIfile2\fP)
.TP 5
.B \-3
# Suppress column 3 (lines present in both files)
.SH EXAMPLES
.EX "comm file1 file2" "Print all three columns"
.EX "comm \-12 file1 file2" "Print only lines common to both files"
.TP 20
.B comm file1 file2
# Print all three columns
.TP 20
.B comm \-12 file1 file2
# Print only lines common to both files
.SH DESCRIPTION
.PP
Two sorted files are read and compared.

View file

@ -15,14 +15,28 @@ compress, uncompress, zcat \- compress a file using modified Lempel-Ziv coding
# \\$2
..
.SH OPTIONS
.FL "\-c" "Put output on \fIstdout\fR instead of on \fIfile.Z\fR"
.FL "\-d" "Decompress instead of compress"
.FL "\-f" "Force output even if there is no saving"
.FL "\-v" "Verbose mode"
.TP 5
.B \-c
# Put output on \fIstdout\fR instead of on \fIfile.Z\fR
.TP 5
.B \-d
# Decompress instead of compress
.TP 5
.B \-f
# Force output even if there is no saving
.TP 5
.B \-v
# Verbose mode
.SH EXAMPLES
.EX "compress <infile >outfile" "Compress 1 file"
.EX "compress x y z" "Compress 3 files to \fIx.Z\fR, \fIy.Z\fR, and \fIz.Z\fR"
.EX "compress \-d file.Z" "Decompress \fIfile.Z\fR to \fIfile\fR"
.TP 20
.B compress <infile >outfile
# Compress 1 file
.TP 20
.B compress x y z
# Compress 3 files to \fIx.Z\fR, \fIy.Z\fR, and \fIz.Z\fR
.TP 20
.B compress \-d file.Z
# Decompress \fIfile.Z\fR to \fIfile\fR
.SH DESCRIPTION
.PP
The listed files (or \fIstdin\fR, if none are given) are compressed

View file

@ -15,7 +15,9 @@ crc \- print the checksum of the file data
# \\$2
..
.SH EXAMPLES
.EX "crc *.c" "Print checksums of all the C programs"
.TP 20
.B crc *.c
# Print checksums of all the C programs
.SH DESCRIPTION
.PP
The checksum of each argument is computed and printed, along with the file

View file

@ -15,9 +15,15 @@ dd \- convert and copy a file
# \\$2
..
.SH EXAMPLES
.EX "dd if=/dev/fd0 of=/dev/fd1" "Copy disk 0 to disk 1"
.EX "dd if=x of=y bs=1w skip=4" "Copy \fIx\fP to \fIy\fP, skipping 4 words"
.EX "dd if=x of=y count=3" "Copy three 512\-byte blocks"
.TP 20
.B dd if=/dev/fd0 of=/dev/fd1
# Copy disk 0 to disk 1
.TP 20
.B dd if=x of=y bs=1w skip=4
# Copy \fIx\fP to \fIy\fP, skipping 4 words
.TP 20
.B dd if=x of=y count=3
# Copy three 512\-byte blocks
.SH DESCRIPTION
.PP
This command is intended for copying partial files.

View file

@ -12,9 +12,15 @@ dev2name \- obtain device name given its number
\\$2
..
.SH OPTIONS
.FL "\fImajor\fR" "Major device number for which to obtain device name"
.FL "\fIminor\fR" "Minor device number for which to obtain device name"
.FL "\fIdeviceno\fR" "Full device number for which to obtain device name (specifies the minor device number in the low-order byte and the major device number in the remainder)"
.TP 5
.B \fImajor\fR
# Major device number for which to obtain device name
.TP 5
.B \fIminor\fR
# Minor device number for which to obtain device name
.TP 5
.B \fIdeviceno\fR
# Full device number for which to obtain device name (specifies the minor device number in the low-order byte and the major device number in the remainder)
.SH DESCRIPTION
.PP
This utility locates a file in \fB/dev\fR that represents the device with the specified major/minor device number and prints its name to the standard output. The exit code is zero if such a device is found and non-zero if no such device was found.

View file

@ -15,7 +15,9 @@ dhrystone \- integer benchmark
# \\$2
..
.SH EXAMPLES
.EX "dhrystone" "Run the dhrystone benchmark"
.TP 20
.B dhrystone
# Run the dhrystone benchmark
.SH DESCRIPTION
.PP
Many years ago, a floating-point benchmark called \fIwhetstone\fR was

View file

@ -15,12 +15,22 @@ dosdir \- list an MS-DOS directory [IBM]
# \\$2
..
.SH OPTIONS
.FL "\-l" "Long listing"
.FL "\-r" "Recursively descend and print subdirectories"
.TP 5
.B \-l
# Long listing
.TP 5
.B \-r
# Recursively descend and print subdirectories
.SH EXAMPLES
.EX "dosdir \-l A" "List root directory on drive A"
.EX "dosdir \-r C x/y" "Recursively list directory \fIx/y\fR"
.EX "dosdir \-r fd1" "List device \fI/dev/fd1\fR"
.TP 20
.B dosdir \-l A
# List root directory on drive A
.TP 20
.B dosdir \-r C x/y
# Recursively list directory \fIx/y\fR
.TP 20
.B dosdir \-r fd1
# List device \fI/dev/fd1\fR
.SH DESCRIPTION
.PP
.I Dosdir

View file

@ -15,10 +15,16 @@ dosread \- read a file from an MS-DOS diskette [IBM]
# \\$2
..
.SH OPTIONS
.FL "\-a" "ASCII file"
.TP 5
.B \-a
# ASCII file
.SH EXAMPLES
.EX "dosread C g/adv >adv" "Read file \fIg/adv\fR from hard disk"
.EX "dosread \-a A prog.c >x" "Read ASCII file \fIprog.c\fR from drive A"
.TP 20
.B dosread C g/adv >adv
# Read file \fIg/adv\fR from hard disk
.TP 20
.B dosread \-a A prog.c >x
# Read ASCII file \fIprog.c\fR from drive A
.SH DESCRIPTION
.PP
.I Dosread

View file

@ -15,10 +15,16 @@ doswrite \- write a file onto an MS-DOS diskette [IBM]
# \\$2
..
.SH OPTIONS
.FL "\-a" "ASCII file"
.TP 5
.B \-a
# ASCII file
.SH EXAMPLES
.EX "doswrite A x/y <z" "Write file \fIz\fR to disk as \fIx/y\fR"
.EX "doswrite \-a B f" "Copy \fIstdin\fR to \s-2MS-DOS\s+2 file \fIf\fR"
.TP 20
.B doswrite A x/y <z
# Write file \fIz\fR to disk as \fIx/y\fR
.TP 20
.B doswrite \-a B f
# Copy \fIstdin\fR to \s-2MS-DOS\s+2 file \fIf\fR
.SH DESCRIPTION
.PP
.I Doswrite

View file

@ -15,9 +15,13 @@ expand \- convert tabs to spaces
# \\$2
..
.SH OPTIONS
.FL "\-\fIt\fR" "Tab stop positions"
.TP 5
.B \-\fIt\fR
# Tab stop positions
.SH EXAMPLES
.EX "expand \-16,32,48,64" "Expand \fIstdin\fR with tabs every 16 columns"
.TP 20
.B expand \-16,32,48,64
# Expand \fIstdin\fR with tabs every 16 columns
.SH DESCRIPTION
.PP
\fIExpand\fR replaces tabs in the named files with the equivalent numbers

View file

@ -15,7 +15,9 @@ factor \- factor an integer less than 2**31
# \\$2
..
.SH EXAMPLES
.EX "factor 450180" "Print the prime factors of 450180"
.TP 20
.B factor 450180
# Print the prime factors of 450180
.SH DESCRIPTION
.PP
\fIFactor\fR prints the prime factors of its argument in increasing order.

View file

@ -15,7 +15,9 @@ file \- make a guess as to a file's type based on contents
# \\$2
..
.SH EXAMPLES
.EX "file a.out ar.h" "Guess at types"
.TP 20
.B file a.out ar.h
# Guess at types
.SH DESCRIPTION
.PP
\fIFile\fR reads the first block of a file and tries to make an

View file

@ -15,10 +15,16 @@ fold \- fold long lines
# \\$2
..
.SH OPTIONS
.FL "\-\fIn\fR" "How long should the output lines be"
.TP 5
.B \-\fIn\fR
# How long should the output lines be
.SH EXAMPLES
.EX "fold \-60" "Fold \fIstdin\fR to 60 characters"
.EX "fold file" "Fold \fIfile\fP to 80 characters"
.TP 20
.B fold \-60
# Fold \fIstdin\fR to 60 characters
.TP 20
.B fold file
# Fold \fIfile\fP to 80 characters
.SH DESCRIPTION
.PP
\fIFold\fR takes copies its input from the named file (or \fIstdin\fR,

View file

@ -15,7 +15,9 @@ fortune \- print a fortune
# \\$2
..
.SH EXAMPLES
.EX "fortune" "Print a fortune"
.TP 20
.B fortune
# Print a fortune
.SH DESCRIPTION
.PP
\fIFortune\fR prints a fortune at random from the fortunes file,

View file

@ -15,16 +15,34 @@ fsck \- perform file system consistency check
# \\$2
..
.SH OPTIONS
.FL "\-a" "Automatically repair inconsistencies"
.FL "\-c" "Check and list only the specified i-nodes
.FL "\-l" "List the files and directories in the filesytem
.FL "\-r" "Prompt user for repairs if inconsistencies are found
.FL "\-s" "List the superblock of the file system"
.TP 5
.B \-a
# Automatically repair inconsistencies
.TP 5
.B \-c
# Check and list only the specified i-nodes
.TP 5
.B \-l
# List the files and directories in the filesytem
.TP 5
.B \-r
# Prompt user for repairs if inconsistencies are found
.TP 5
.B \-s
# List the superblock of the file system
.SH EXAMPLES
.EX "fsck /dev/c0d0p3" "Check file system on \fI/dev/c0d0p3\fR"
.EX "fsck \-a /dev/at0" "Automatically fix errors on \fI/dev/at0\fR"
.EX "fsck \-l /dev/fd0" "List the contents of \fI/dev/fd0\fR"
.EX "fsck \-c 2 3 /dev/c0d0p2" "Check and list \fI/dev/c0d0p2\fR i-nodes 2 & 3"
.TP 20
.B fsck /dev/c0d0p3
# Check file system on \fI/dev/c0d0p3\fR
.TP 20
.B fsck \-a /dev/at0
# Automatically fix errors on \fI/dev/at0\fR
.TP 20
.B fsck \-l /dev/fd0
# List the contents of \fI/dev/fd0\fR
.TP 20
.B fsck \-c 2 3 /dev/c0d0p2
# Check and list \fI/dev/c0d0p2\fR i-nodes 2 & 3
.SH DESCRIPTION
.PP
\fIFsck\fR performs consistency checks on the file systems which reside

View file

@ -15,11 +15,19 @@ head \- print the first few lines of a file
# \\$2
..
.SH OPTIONS
.FL "\-n \fIn\fR" "How many lines to print"
.FL "\-\fIn\fR" "How many lines to print (backwards-compatible)"
.TP 5
.B \-n \fIn\fR
# How many lines to print
.TP 5
.B \-\fIn\fR
# How many lines to print (backwards-compatible)
.SH EXAMPLES
.EX "head \-n 6" "Print first 6 lines of \fIstdin\fR"
.EX "head \-1 file1 file2" "Print first line of two files"
.TP 20
.B head \-n 6
# Print first 6 lines of \fIstdin\fR
.TP 20
.B head \-1 file1 file2
# Print first line of two files
.SH DESCRIPTION
.PP
The first few lines of one or more files are printed.

View file

@ -15,14 +15,28 @@ ifdef \- remove #ifdefs from a file
# \\$2
..
.SH OPTIONS
.FL "\-D" "Define symbol permanently"
.FL "\-I" "Ignore symbol"
.FL "\-U" "Undefine symbol permanently"
.FL "\-d" "Define symbol. It may be #undef'ed later"
.FL "\-t" "Produce a table of the symbols on \fIstdout\fR"
.TP 5
.B \-D
# Define symbol permanently
.TP 5
.B \-I
# Ignore symbol
.TP 5
.B \-U
# Undefine symbol permanently
.TP 5
.B \-d
# Define symbol. It may be #undef'ed later
.TP 5
.B \-t
# Produce a table of the symbols on \fIstdout\fR
.SH EXAMPLES
.EX "ifdef \-DUNIX file.c >newfile.c" "Define \fIUNIX\fR"
.EX "ifdef \-D_MINIX \-UDOS <x.c >y.c "Define \fI_MINIX\fR, undefine \fIDOS\fR"
.TP 20
.B ifdef \-DUNIX file.c >newfile.c
# Define \fIUNIX\fR
.TP 20
.B ifdef \-D_MINIX \-UDOS <x.c >y.c
# Define \fI_MINIX\fR, undefine \fIDOS\fR
.SH DESCRIPTION
.PP
\fIIfdef\fR

View file

@ -15,13 +15,25 @@ kill \- send a signal to a process
# \\$2
..
.SH OPTIONS
.FL "\-\fIn\fR" "Signal number to send"
.FL "\-\fINAME\fR" "Named signal to send"
.TP 5
.B \-\fIn\fR
# Signal number to send
.TP 5
.B \-\fINAME\fR
# Named signal to send
.SH EXAMPLES
.EX "kill 35" "Send signal 15 to process 35"
.EX "kill \-9 40" "Send signal 9 to process 40"
.EX "kill \-2 0" "Send signal 2 to whole terminal process group"
.EX "kill \-HUP -123" "Send a hangup to process group 123"
.TP 20
.B kill 35
# Send signal 15 to process 35
.TP 20
.B kill \-9 40
# Send signal 9 to process 40
.TP 20
.B kill \-2 0
# Send signal 2 to whole terminal process group
.TP 20
.B kill \-HUP -123
# Send a hangup to process group 123
.SH DESCRIPTION
.PP
A signal is sent to a given process.

View file

@ -17,15 +17,31 @@ last, uptime \- display recent on-line session records, show uptime
# \\$2
..
.SH OPTIONS
.FL "\-f" "Use \fIfile\fR instead of /usr/adm/wtmp"
.FL "\-r" "Search backwards only to last reboot"
.FL "\-u" "Print uptime since last reboot"
.FL "\-\fIn\fP" "Print a maximum of \fIn\fR lines"
.TP 5
.B \-f
# Use \fIfile\fR instead of /usr/adm/wtmp
.TP 5
.B \-r
# Search backwards only to last reboot
.TP 5
.B \-u
# Print uptime since last reboot
.TP 5
.B \-\fIn\fP
# Print a maximum of \fIn\fR lines
.SH EXAMPLES
.EX "last reboot" "When was the system last rebooted?"
.EX "last ast" "When was the last login for ast?"
.EX "last \-10 tty00 tty01" "Display last 10 logins on tty00 or tty01"
.EX "uptime" "Display uptime (likewise \fBlast \-u\fR)"
.TP 20
.B last reboot
# When was the system last rebooted?
.TP 20
.B last ast
# When was the last login for ast?
.TP 20
.B last \-10 tty00 tty01
# Display last 10 logins on tty00 or tty01
.TP 20
.B uptime
# Display uptime (likewise \fBlast \-u\fR)
.SH DESCRIPTION
.PP
.I Last

View file

@ -15,7 +15,9 @@ loadfont \- load a font into the video card
# \\$2
..
.SH EXAMPLES
.EX "loadfont iso1.fnt" "Loads the ISO 8859-1 (Latin-1) font"
.TP 20
.B loadfont iso1.fnt
# Loads the ISO 8859-1 (Latin-1) font
.SH DESCRIPTION
.PP
.I Loadfont

View file

@ -15,7 +15,9 @@ loadkeys \- load a keyboard map into the keyboard driver
# \\$2
..
.SH EXAMPLES
.EX "loadkeys spanish.map" "Load a map for a Spanish keyboard"
.TP 20
.B loadkeys spanish.map
# Load a map for a Spanish keyboard
.SH DESCRIPTION
.PP
.I Loadkeys

View file

@ -15,7 +15,9 @@ login \- log into the computer
# \\$2
..
.SH EXAMPLES
.EX "login ast" "Login as ast"
.TP 20
.B login ast
# Login as ast
.SH DESCRIPTION
.PP
\fILogin\fR allows a logged in user to login as someone else without first

View file

@ -17,21 +17,47 @@ mail \- send and receive electronic mail
# \\$2
..
.SH OPTIONS
.FL "\-e" "Exit with status TRUE or FALSE to indicate if there is mail in mailbox"
.FL "\-p" "Print all mail and then exit"
.FL "\-q" "Quit program if SIGINT received"
.FL "\-r" "Reverse print order, i.e., print oldest first"
.FL "\-f" "Use \fIfile\fR instead of \fI/usr/spool/mail/user\fR as mailbox"
.TP 5
.B \-e
# Exit with status TRUE or FALSE to indicate if there is mail in mailbox
.TP 5
.B \-p
# Print all mail and then exit
.TP 5
.B \-q
# Quit program if SIGINT received
.TP 5
.B \-r
# Reverse print order, i.e., print oldest first
.TP 5
.B \-f
# Use \fIfile\fR instead of \fI/usr/spool/mail/user\fR as mailbox
.PP
.FL "\-d" "Force use of the shell variable \fIMAILER\fR"
.FL "\-t" "Show distribution list as Dist: header in message"
.FL "\-v" "Verbose mode (passed on to \fIMAILER\fR)"
.FL "\-s" "Use Subject: \fIsubject\fR"
.TP 5
.B \-d
# Force use of the shell variable \fIMAILER\fR
.TP 5
.B \-t
# Show distribution list as Dist: header in message
.TP 5
.B \-v
# Verbose mode (passed on to \fIMAILER\fR)
.TP 5
.B \-s
# Use Subject: \fIsubject\fR
.SH EXAMPLES
.EX "mail ast" "Send a message to \fIast\fR"
.EX "mail" "Read your mail"
.EX "cat mail.cdiff | mail -s ''Here's the diff!'' asw " "Pipe program output to mail with a subject line"
.EX "mail -f /usr/spool/mail/asw" "How root can read asw's mail"
.TP 20
.B mail ast
# Send a message to \fIast\fR
.TP 20
.B mail
# Read your mail
.TP 20
.B cat mail.cdiff | mail -s ''Here's the diff!'' asw
# Pipe program output to mail with a subject line
.TP 20
.B mail -f /usr/spool/mail/asw
# How root can read asw's mail
.SH DESCRIPTION
.PP
\fIMail\fR is an extremely simple electronic mail program. It can be used

View file

@ -15,18 +15,40 @@ mkfs \- make a file system
# \\$2
..
.SH OPTIONS
.FL "\-L" "Make a listing on standard output"
.FL "\-d" "Use mod time of \fImkfs\fR binary for all files"
.FL "\-o" "Use a drive other than 0 or 1 (safety precaution)"
.FL "\-t" "Do not test if file system fits on the medium"
.FL "\-1" "Make a version 1 file system (for backward compatibility)"
.FL "\-i" "Number of i-nodes (files)"
.FL "\-B" "Filesystem block size (in bytes)"
.FL "\-b" "Filesystem size (in blocks)"
.TP 5
.B \-L
# Make a listing on standard output
.TP 5
.B \-d
# Use mod time of \fImkfs\fR binary for all files
.TP 5
.B \-o
# Use a drive other than 0 or 1 (safety precaution)
.TP 5
.B \-t
# Do not test if file system fits on the medium
.TP 5
.B \-1
# Make a version 1 file system (for backward compatibility)
.TP 5
.B \-i
# Number of i-nodes (files)
.TP 5
.B \-B
# Filesystem block size (in bytes)
.TP 5
.B \-b
# Filesystem size (in blocks)
.SH EXAMPLES
.EX "mkfs /dev/fd1 proto" "Make a file system on \fI/dev/fd1\fR"
.EX "mkfs -b 360 /dev/fd1" "Make empty 360 block file system"
.EX "mkfs /dev/fd1 360" "Alternate way to specify the size"
.TP 20
.B mkfs /dev/fd1 proto
# Make a file system on \fI/dev/fd1\fR
.TP 20
.B mkfs -b 360 /dev/fd1
# Make empty 360 block file system
.TP 20
.B mkfs /dev/fd1 360
# Alternate way to specify the size
.SH DESCRIPTION
.PP
.I Mkfs

View file

@ -15,17 +15,37 @@ mkproto \- create a MINIX 3 prototype file
# \\$2
..
.SH OPTIONS
.FL "\-b" "Number of blocks in the prototype is \fIn\fR"
.FL "\-d" "Indent the prototype file using \fIstr\fR instead of tab"
.FL "\-g" "Use \fIn\fR as the gid for all files and directories"
.FL "\-i" "Number of i-nodes in the prototype is \fIn\fR"
.FL "\-p" "Use \fInnn\fR (3 octal digits) as the protection mode"
.FL "\-s" "Use the same uid, gid and mode as the source files have"
.FL "\-t" "Use the string \fIroot\fR as the path prefix for every file"
.FL "\-u" "Use \fIn\fR as the uid for all files and directories"
.TP 5
.B \-b
# Number of blocks in the prototype is \fIn\fR
.TP 5
.B \-d
# Indent the prototype file using \fIstr\fR instead of tab
.TP 5
.B \-g
# Use \fIn\fR as the gid for all files and directories
.TP 5
.B \-i
# Number of i-nodes in the prototype is \fIn\fR
.TP 5
.B \-p
# Use \fInnn\fR (3 octal digits) as the protection mode
.TP 5
.B \-s
# Use the same uid, gid and mode as the source files have
.TP 5
.B \-t
# Use the string \fIroot\fR as the path prefix for every file
.TP 5
.B \-u
# Use \fIn\fR as the uid for all files and directories
.SH EXAMPLES
.EX "mkproto \-b360" "Make a 360K prototype of this directory"
.EX "mkproto \-u2 \-g1 \-p644" "Give all files uid 2, gid 1 and mode 644"
.TP 20
.B mkproto \-b360
# Make a 360K prototype of this directory
.TP 20
.B mkproto \-u2 \-g1 \-p644
# Give all files uid 2, gid 1 and mode 644
.SH DESCRIPTION
.PP
\fIMkproto\fR creates an \fImkfs\fR prototype file for the specified

View file

@ -15,13 +15,25 @@ mount \- mount a file system
# \\$2
..
.SH OPTIONS
.FL "\-r" "File system is mounted read-only"
.FL "\-t" "File system type"
.FL "\-n" "Don't update mtab"
.FL "\-o" "Options passed to FS server"
.TP 5
.B \-r
# File system is mounted read-only
.TP 5
.B \-t
# File system type
.TP 5
.B \-n
# Don't update mtab
.TP 5
.B \-o
# Options passed to FS server
.SH EXAMPLES
.EX "mount /dev/fd1 /user" "Mount diskette 1 on \fI/user\fP"
.EX "mount \-t procfs none /proc" "Mount proc file system on \fI/proc\fP"
.TP 20
.B mount /dev/fd1 /user
# Mount diskette 1 on \fI/user\fP
.TP 20
.B mount \-t procfs none /proc
# Mount proc file system on \fI/proc\fP
.SH DESCRIPTION
.PP
The file system contained on the special file \fIspecial\fP is mounted on

View file

@ -15,16 +15,34 @@ nm \- print name list
# \\$2
..
.SH OPTIONS
.FL "\-d" "Print the offsets in decimal instead of in hex"
.FL "\-g" "Print only external symbols"
.FL "\-n" "Sort numerically rather than alphabetically"
.FL "\-o" "Prepend file name to each line rather than only once"
.FL "\-p" "Do not sort, print in symbol-table order"
.FL "\-r" "Sort in reverse order"
.FL "\-u" "Print only undefined symbols"
.TP 5
.B \-d
# Print the offsets in decimal instead of in hex
.TP 5
.B \-g
# Print only external symbols
.TP 5
.B \-n
# Sort numerically rather than alphabetically
.TP 5
.B \-o
# Prepend file name to each line rather than only once
.TP 5
.B \-p
# Do not sort, print in symbol-table order
.TP 5
.B \-r
# Sort in reverse order
.TP 5
.B \-u
# Print only undefined symbols
.SH EXAMPLES
.EX "nm \-n a.out" "Print all symbols in numerical order"
.EX "nm \-dg a.out" "Print globals alphabetically in decimal"
.TP 20
.B nm \-n a.out
# Print all symbols in numerical order
.TP 20
.B nm \-dg a.out
# Print globals alphabetically in decimal
.SH DESCRIPTION
.PP
\fINm\fR prints the symbol table of executable files when it is available.

View file

@ -15,17 +15,37 @@ od \- octal dump
# \\$2
..
.SH OPTIONS
.FL "\-b" "Dump bytes in octal"
.FL "\-c" "Dump bytes as ASCII characters"
.FL "\-d" "Dump words in decimal"
.FL "\-h" "Print addresses in hex (default is octal)"
.FL "\-o" "Dump words in octal (default)"
.FL "\-v" "Verbose (list duplicate lines)"
.FL "\-x" "Dump words in hex"
.TP 5
.B \-b
# Dump bytes in octal
.TP 5
.B \-c
# Dump bytes as ASCII characters
.TP 5
.B \-d
# Dump words in decimal
.TP 5
.B \-h
# Print addresses in hex (default is octal)
.TP 5
.B \-o
# Dump words in octal (default)
.TP 5
.B \-v
# Verbose (list duplicate lines)
.TP 5
.B \-x
# Dump words in hex
.SH EXAMPLES
.EX "od \-ox file" "Dump \fIfile\fP in octal and hex"
.EX "od \-d file +1000" "Dump \fIfile\fP starting at byte 01000"
.EX "od \-c file +10.b" "Dump \fIfile\fP starting at block 10"
.TP 20
.B od \-ox file
# Dump \fIfile\fP in octal and hex
.TP 20
.B od \-d file +1000
# Dump \fIfile\fP starting at byte 01000
.TP 20
.B od \-c file +10.b
# Dump \fIfile\fP starting at block 10
.SH DESCRIPTION
.PP
.I Od

View file

@ -15,12 +15,22 @@ paste \- paste multiple files together
# \\$2
..
.SH OPTIONS
.FL "\-d" "Set delimiter used to separate columns to \fIlist\fR.
.FL "\-s" "Print files sequentially, file \fIk\fR on line \fIk\fR.
.TP 5
.B \-d
# Set delimiter used to separate columns to \fIlist\fR.
.TP 5
.B \-s
# Print files sequentially, file \fIk\fR on line \fIk\fR.
.SH EXAMPLES
.EX "paste file1 file2" "Print \fIfile1\fR in col 1, \fIfile2\fR in col 2"
.EX "paste \-s f1 f2" "Print \fIf1\fR on line 1 and \fIf2\fR on line 2"
.EX "paste -d : file1 file2" "Print the lines separated by a colon"
.TP 20
.B paste file1 file2
# Print \fIfile1\fR in col 1, \fIfile2\fR in col 2
.TP 20
.B paste \-s f1 f2
# Print \fIf1\fR on line 1 and \fIf2\fR on line 2
.TP 20
.B paste -d : file1 file2
# Print the lines separated by a colon
.SH DESCRIPTION
.PP
\fIPaste\fR concatenates corresponding lines of the given input files

View file

@ -9,8 +9,12 @@ ping \- send ICMP ECHO_REQUEST packets to network hosts
# \\$2
..
.SH EXAMPLES
.EX "ping 192.168.1.1" "Ping host 192.168.1.1"
.EX "ping www.minix3.org 500" "Ping www.minix3.org with 500 byte IP packets"
.TP 20
.B ping 192.168.1.1
# Ping host 192.168.1.1
.TP 20
.B ping www.minix3.org 500
# Ping www.minix3.org with 500 byte IP packets
.SH DESCRIPTION
.PP
Sends ICMP ECHO_REQUEST packets to the specified host and waits for a ECHO_REPLY.

View file

@ -15,17 +15,37 @@ pr \- print a file
# \\$2
..
.SH OPTIONS
.FL "\-M" "Use MINIX style line number"
.FL "\-f" "Do not fold long lines"
.FL "\-h" "Take next argument as page header"
.FL "\-l" "Sets page length in lines"
.FL "\-n" "Number the output lines"
.FL "\-t" "Do not print page header or trailer"
.FL "\-w" "Sets line length in characters"
.TP 5
.B \-M
# Use MINIX style line number
.TP 5
.B \-f
# Do not fold long lines
.TP 5
.B \-h
# Take next argument as page header
.TP 5
.B \-l
# Sets page length in lines
.TP 5
.B \-n
# Number the output lines
.TP 5
.B \-t
# Do not print page header or trailer
.TP 5
.B \-w
# Sets line length in characters
.SH EXAMPLES
.EX "pr \-w85 \-l60 file" "Use 85 character line, 60 line page"
.EX "pr \-3 file" "List \fIfile\fP three columns to a page"
.EX "pr +4 file" "Start printing with page 4"
.TP 20
.B pr \-w85 \-l60 file
# Use 85 character line, 60 line page
.TP 20
.B pr \-3 file
# List \fIfile\fP three columns to a page
.TP 20
.B pr +4 file
# Start printing with page 4
.SH DESCRIPTION
.PP
.I Pr

View file

@ -15,7 +15,9 @@ prep \- prepare a text file for statistical analysis
# \\$2
..
.SH EXAMPLES
.EX "prep infile >outfile" "Prepare \fIinfile\fR"
.TP 20
.B prep infile >outfile
# Prepare \fIinfile\fR
.SH DESCRIPTION
.PP
\fIPrep\fR strips off most of the troff commands from a text file and then

View file

@ -15,14 +15,28 @@ ps \- process status
# \\$2
..
.SH OPTIONS
.FL "\-a" "Print all processes with controlling terminals"
.FL "\-l" "Give long listing"
.FL "\-x" "Include processes without a terminal"
.FL "\-E" "Print kernel endpoint numbers where pids are normally printed"
.TP 5
.B \-a
# Print all processes with controlling terminals
.TP 5
.B \-l
# Give long listing
.TP 5
.B \-x
# Include processes without a terminal
.TP 5
.B \-E
# Print kernel endpoint numbers where pids are normally printed
.SH EXAMPLES
.EX "ps " "Show user's own processes in short format"
.EX "ps \-axlE" "Print all processes and tasks in long format"
.EX "ps \axlE" "Same -- the '\-' is optional"
.TP 20
.B ps
# Show user's own processes in short format
.TP 20
.B ps \-axlE
# Print all processes and tasks in long format
.TP 20
.B ps \axlE
# Same -- the '\-' is optional
.SH DESCRIPTION
.PP
\fIPs\fR prints the status of active processes. Normally only the caller's own

View file

@ -15,7 +15,9 @@ pwd \- print working directory
# \\$2
..
.SH EXAMPLES
.EX "pwd " "Print the name of the working directory"
.TP 20
.B pwd
# Print the name of the working directory
.SH DESCRIPTION
.PP
The full path name of the current working directory is printed.

View file

@ -15,11 +15,19 @@ readall \- read a device quickly to check for bad blocks
# \\$2
..
.SH OPTIONS
.FL "\-b" "Produce shell script on \fIstdout\fR that calls \fIbadblocks\fR"
.FL "\-t" "Just print device size"
.TP 5
.B \-b
# Produce shell script on \fIstdout\fR that calls \fIbadblocks\fR
.TP 5
.B \-t
# Just print device size
.SH EXAMPLES
.EX "readall /dev/hd0" "Read all of \fI/dev/hd0\fR"
.EX "readall -b /dev/hd1 >s" "Generate shell script on \fIs\fR"
.TP 20
.B readall /dev/hd0
# Read all of \fI/dev/hd0\fR
.TP 20
.B readall -b /dev/hd1 >s
# Generate shell script on \fIs\fR
.SH DESCRIPTION
.PP
\fIReadall\fR reads all of the named device in large chunks.

View file

@ -15,16 +15,34 @@ rz \- receive a file using the zmodem protocol
# \\$2
..
.SH OPTIONS
.FL "\-a" "CP/M to UNIX conventions"
.FL "\-b" "Binary file"
.FL "\-e" "Escape for all control characters"
.FL "\-p" "Protect file if it already exists"
.FL "\-q" "Quiet; opposite of verbose"
.FL "\-t" "Set \fItimeout\fR in tenths of a second"
.FL "\-v" "Verbose; opposite of quiet"
.FL "\-y" "Yes, clobber existing files"
.TP 5
.B \-a
# CP/M to UNIX conventions
.TP 5
.B \-b
# Binary file
.TP 5
.B \-e
# Escape for all control characters
.TP 5
.B \-p
# Protect file if it already exists
.TP 5
.B \-q
# Quiet; opposite of verbose
.TP 5
.B \-t
# Set \fItimeout\fR in tenths of a second
.TP 5
.B \-v
# Verbose; opposite of quiet
.TP 5
.B \-y
# Yes, clobber existing files
.SH EXAMPLES
.EX "rz </dev/tty01 >/dev/tty01" "Receive a file"
.TP 20
.B rz </dev/tty01 >/dev/tty01
# Receive a file
.SH DESCRIPTION
.PP
The XMODEM, YMODEM, and ZMODEM family of file transfer programs are widely

View file

@ -15,8 +15,12 @@ shar \- shell archiver
# \\$2
..
.SH EXAMPLES
.EX "shar *.c >s" "Collect C programs in shell archive"
.EX "sh <s" "Extract files from a shell archive"
.TP 20
.B shar *.c >s
# Collect C programs in shell archive
.TP 20
.B sh <s
# Extract files from a shell archive
.SH DESCRIPTION
.PP
The named files are collected together into a shell archive written onto

View file

@ -15,7 +15,9 @@ sleep \- suspend execution for a given number of seconds
# \\$2
..
.SH EXAMPLES
.EX "sleep 10" "Suspend execution for 10 sec."
.TP 20
.B sleep 10
# Suspend execution for 10 sec.
.SH DESCRIPTION
.PP
The caller is suspended for the indicated number of seconds.

View file

@ -15,22 +15,52 @@ sort \- sort a file of ASCII lines
# \\$2
..
.SH OPTIONS
.FL "\-b" "Skip leading blanks when making comparisons"
.FL "\-c" "Check to see if a file is sorted"
.FL "\-d" "Dictionary order: ignore punctuation"
.FL "\-f" "Fold upper case onto lower case"
.FL "\-i" "Ignore nonASCII characters"
.FL "\-m" "Merge presorted files"
.FL "\-n" "Numeric sort order"
.FL "\-o" "Next argument is output file"
.FL "\-r" "Reverse the sort order"
.FL "\-t" "Following character is field separator"
.FL "\-u" "Unique mode (delete duplicate lines)"
.TP 5
.B \-b
# Skip leading blanks when making comparisons
.TP 5
.B \-c
# Check to see if a file is sorted
.TP 5
.B \-d
# Dictionary order: ignore punctuation
.TP 5
.B \-f
# Fold upper case onto lower case
.TP 5
.B \-i
# Ignore nonASCII characters
.TP 5
.B \-m
# Merge presorted files
.TP 5
.B \-n
# Numeric sort order
.TP 5
.B \-o
# Next argument is output file
.TP 5
.B \-r
# Reverse the sort order
.TP 5
.B \-t
# Following character is field separator
.TP 5
.B \-u
# Unique mode (delete duplicate lines)
.SH EXAMPLES
.EX "sort \-nr file" "Sort keys numerically, reversed"
.EX "sort +2 \-4 file" "Sort using fields 2 and 3 as key"
.EX "sort +2 \-t: \-o out" "Field separator is \fI:\fP"
.EX "sort +.3 \-.6" "Characters 3 through 5 form the key"
.TP 20
.B sort \-nr file
# Sort keys numerically, reversed
.TP 20
.B sort +2 \-4 file
# Sort using fields 2 and 3 as key
.TP 20
.B sort +2 \-t: \-o out
# Field separator is \fI:\fP
.TP 20
.B sort +.3 \-.6
# Characters 3 through 5 form the key
.SH DESCRIPTION
.PP
.I Sort

View file

@ -15,7 +15,9 @@ spell \- print all words in a file not present in the dictionary
# \\$2
..
.SH EXAMPLES
.EX "spell document" "Print the spelling errors on \fIstdout\fR"
.TP 20
.B spell document
# Print the spelling errors on \fIstdout\fR
.SH DESCRIPTION
.PP
\fISpell\fR is the

View file

@ -15,10 +15,16 @@ split \- split a large file into several smaller files
# \\$2
..
.SH OPTIONS
.FL "\-\fIn\fP" "Number of lines per piece (default: 1000)"
.TP 5
.B \-\fIn\fP
# Number of lines per piece (default: 1000)
.SH EXAMPLES
.EX "split \-200 file" "Split \fIfile\fP into pieces of 200 lines each"
.EX "split file z" "Split \fIfile\fP into \fIzaa\fP, \fIzab\fP, etc."
.TP 20
.B split \-200 file
# Split \fIfile\fP into pieces of 200 lines each
.TP 20
.B split file z
# Split \fIfile\fP into \fIzaa\fP, \fIzab\fP, etc.
.SH DESCRIPTION
.PP
.I Split

View file

@ -15,7 +15,9 @@ sum \- compute the checksum and block count of a file
# \\$2
..
.SH EXAMPLES
.EX "sum /user/ast/xyz" "Checksum \fI/user/ast/xyz"
.TP 20
.B sum /user/ast/xyz
# Checksum \fI/user/ast/xyz
.SH DESCRIPTION
.PP
.I Sum

View file

@ -19,14 +19,28 @@ svc, ci, co, svclog \- shell version control system
# \\$2
..
.SH OPTIONS
.FL "\-l" "For \fIci\fR, checkin, checkout again, and lock file"
.FL "\-l" "For \fIco\fR, checkout file and then lock the archive"
.FL "\-u" "After checking in, do not delete the file"
.FL "\-r" "Check out revision \fIrev\fR instead most recent revision
.TP 5
.B \-l
# For \fIci\fR, checkin, checkout again, and lock file
.TP 5
.B \-l
# For \fIco\fR, checkout file and then lock the archive
.TP 5
.B \-u
# After checking in, do not delete the file
.TP 5
.B \-r
# Check out revision \fIrev\fR instead most recent revision
.SH EXAMPLES
.EX "ci \-u file" "Check in \fIfile\fR"
.EX "co \-l file" "Check out \fIfile\fR and lock archive"
.EX "co \-r 2 file" "Check out version 2"
.TP 20
.B ci \-u file
# Check in \fIfile\fR
.TP 20
.B co \-l file
# Check out \fIfile\fR and lock archive
.TP 20
.B co \-r 2 file
# Check out version 2
.SH DESCRIPTION
.PP
\fISvc\fR is the Shell Version Control system, patterned on RCS.

View file

@ -15,27 +15,67 @@ sz \- send a file using the zmodem protocol
# \\$2
..
.SH OPTIONS
.FL "\-L" "Use \fIn\fR-byte packets"
.FL "\-N" "Overwrite if source is newer/longer"
.FL "\-b" "Binary file"
.FL "\-c" "Send command for execution"
.FL "\-d" "Convert dot to slash in names"
.FL "\-e" "Escape for all control characters"
.FL "\-f" "Send full path name"
.FL "\-i" "Send command and return immediately"
.FL "\-l" "Flow control every \fIn\fR packets"
.FL "\-n" "Overwrite destination if source is newer"
.FL "\-o" "Use old (16-bit) checksum"
.FL "\-p" "Protect file if it already exists"
.FL "\-q" "Quiet; opposite of verbose"
.FL "\-r" "Resume interrupt file transfer"
.FL "\-t" "Set \fItimeout\fR in tenths of a second"
.FL "\-u" "Unlink file after successful transmission"
.FL "\-v" "Verbose; opposite of quiet"
.FL "\-y" "Yes, clobber existing files"
.FL "\-+" "Append to an existing file"
.TP 5
.B \-L
# Use \fIn\fR-byte packets
.TP 5
.B \-N
# Overwrite if source is newer/longer
.TP 5
.B \-b
# Binary file
.TP 5
.B \-c
# Send command for execution
.TP 5
.B \-d
# Convert dot to slash in names
.TP 5
.B \-e
# Escape for all control characters
.TP 5
.B \-f
# Send full path name
.TP 5
.B \-i
# Send command and return immediately
.TP 5
.B \-l
# Flow control every \fIn\fR packets
.TP 5
.B \-n
# Overwrite destination if source is newer
.TP 5
.B \-o
# Use old (16-bit) checksum
.TP 5
.B \-p
# Protect file if it already exists
.TP 5
.B \-q
# Quiet; opposite of verbose
.TP 5
.B \-r
# Resume interrupt file transfer
.TP 5
.B \-t
# Set \fItimeout\fR in tenths of a second
.TP 5
.B \-u
# Unlink file after successful transmission
.TP 5
.B \-v
# Verbose; opposite of quiet
.TP 5
.B \-y
# Yes, clobber existing files
.TP 5
.B \-+
# Append to an existing file
.SH EXAMPLES
.EX "sz file </dev/tty01 >/dev/tty01" "Send \fIfile\fR"
.TP 20
.B sz file </dev/tty01 >/dev/tty01
# Send \fIfile\fR
.SH DESCRIPTION
.PP
XMODEM, YMODEM, and ZMODEM are a family of protocols that are widely used

View file

@ -15,14 +15,28 @@ tail \- print the last few lines of a file
# \\$2
..
.SH OPTIONS
.FL "\-c" "The count refers to characters"
.FL "\-f" "On FIFO or special file, keep reading after EOF"
.FL "\-n" "The count refers to lines"
.TP 5
.B \-c
# The count refers to characters
.TP 5
.B \-f
# On FIFO or special file, keep reading after EOF
.TP 5
.B \-n
# The count refers to lines
.SH EXAMPLES
.EX "tail \-n 6" "Print last 6 lines of \fIstdin\fR"
.EX "tail \-c 20 file" "Print the last 20 characters of \fIfile\fR"
.EX "tail \-n 1 file1 file2" "Print last line of two files"
.EX "tail \-n +8 file" "Print the tail starting with line 8"
.TP 20
.B tail \-n 6
# Print last 6 lines of \fIstdin\fR
.TP 20
.B tail \-c 20 file
# Print the last 20 characters of \fIfile\fR
.TP 20
.B tail \-n 1 file1 file2
# Print last line of two files
.TP 20
.B tail \-n +8 file
# Print the tail starting with line 8
.SH DESCRIPTION
.PP
The last few lines of one or more files are printed.

View file

@ -15,11 +15,19 @@ tee \- divert stdin to a file
# \\$2
..
.SH OPTIONS
.FL "\-a" "Append to the files, rather than overwriting"
.FL "\-i" "Ignore interrupts"
.TP 5
.B \-a
# Append to the files, rather than overwriting
.TP 5
.B \-i
# Ignore interrupts
.SH EXAMPLES
.EX "cat file1 file2 | tee x" "Save and display two files"
.EX "pr file | tee x | lp" "Save the output of \fIpr\fP on \fIx\fP"
.TP 20
.B cat file1 file2 | tee x
# Save and display two files
.TP 20
.B pr file | tee x | lp
# Save the output of \fIpr\fP on \fIx\fP
.SH DESCRIPTION
.PP
.I Tee

View file

@ -19,11 +19,21 @@ term \- turn PC into a dumb terminal [IBM]
# \\$2
..
.SH EXAMPLES
.EX "term 2400" "Talk to modem at 2400 baud"
.EX "term 1200 7 even" "1200 baud, 7 bits/char, even parity"
.EX "term 8 9600 /dev/tty01" "9600 baud, 8 bits/char, no parity, use tty01"
.EX "term -atdt12345 /dev/tty01" "Start with a command to dial out"
.EX "term -cH'echo Hello World!' ..." "Bind a shell command to the 'H' key"
.TP 20
.B term 2400
# Talk to modem at 2400 baud
.TP 20
.B term 1200 7 even
# 1200 baud, 7 bits/char, even parity
.TP 20
.B term 8 9600 /dev/tty01
# 9600 baud, 8 bits/char, no parity, use tty01
.TP 20
.B term -atdt12345 /dev/tty01
# Start with a command to dial out
.TP 20
.B term -cH'echo Hello World!' ...
# Bind a shell command to the 'H' key
.SH DESCRIPTION
.PP
\fITerm\fR allows

View file

@ -15,7 +15,9 @@ termcap \- print the current termcap entry
# \\$2
..
.SH EXAMPLES
.EX "termcap" "Print the termcap entry"
.TP 20
.B termcap
# Print the termcap entry
.SH DESCRIPTION
.PP
\fITermcap\fR reads the /etc/termcap entry corresponding to the

View file

@ -17,8 +17,12 @@ time \- report how long a command takes
The -C option tells time to report the cpu cycle counter
difference.
.SH EXAMPLES
.EX "time a.out" "Report how long \fIa.out\fR takes"
.EX "time ls \-l *.c" "Report how long \fIls\fR takes"
.TP 20
.B time a.out
# Report how long \fIa.out\fR takes
.TP 20
.B time ls \-l *.c
# Report how long \fIls\fR takes
.SH DESCRIPTION
.PP
The command is executed and the real time, user time, and system time (in

View file

@ -15,12 +15,22 @@ tr \- translate character codes
# \\$2
..
.SH OPTIONS
.FL "\-c" "Complement the set of characters in \fIstring1\fR"
.FL "\-d" "Delete all characters specified in \fIstring1\fR"
.FL "\-s" "Squeeze all runs of characters in \fIstring1\fR to one character"
.TP 5
.B \-c
# Complement the set of characters in \fIstring1\fR
.TP 5
.B \-d
# Delete all characters specified in \fIstring1\fR
.TP 5
.B \-s
# Squeeze all runs of characters in \fIstring1\fR to one character
.SH EXAMPLES
.EX "tr \(fmA\-Z\(fm \(fma\-z\(fm <x >y " "Convert upper case to lower case"
.EX "tr \-d \(fm0123456789\(fm <f1 >f2 " "Delete all digits from \fIf1\fR"
.TP 20
.B tr \(fmA\-Z\(fm \(fma\-z\(fm <x >y
# Convert upper case to lower case
.TP 20
.B tr \-d \(fm0123456789\(fm <f1 >f2
# Delete all digits from \fIf1\fR
.SH DESCRIPTION
.PP
.I Tr
@ -51,6 +61,10 @@ upper and xdigit. If any of these keywords is encountered between backets and
colons, it is replaced by respectively alphanumeric characters, alphabetic
characters, decimal digits, lowercase letters, uppercase letters and
hexadecimal digits. The following are equivalent with the given examples:
.EX "tr \(fm[:upper:]\(fm \(fm[:lower:]\(fm <x >y " "Convert upper case to lower case"
.EX "tr \-d \(fm[:digit:]\(fm <f1 >f2 " "Delete all digits from \fIf1\fR"
.TP 20
.B tr \(fm[:upper:]\(fm \(fm[:lower:]\(fm <x >y
# Convert upper case to lower case
.TP 20
.B tr \-d \(fm[:digit:]\(fm <f1 >f2
# Delete all digits from \fIf1\fR

View file

@ -15,8 +15,12 @@ tsort \- topological sort [IBM]
# \\$2
..
.SH EXAMPLES
.EX "lorder *.s | tsort" "Give library ordering"
.EX "ar cr libc.a \`lorder *.s | tsort\`" "Build library"
.TP 20
.B lorder *.s | tsort
# Give library ordering
.TP 20
.B ar cr libc.a \`lorder *.s | tsort\`
# Build library
.SH DESCRIPTION
.PP
\fITsort\fR accepts a file of lines containing ordered pairs and builds a

View file

@ -15,9 +15,13 @@ tty \- print the device name of this tty
# \\$2
..
.SH OPTIONS
.FL "\-s" "Silent mode, only the exit status is affected."
.TP 5
.B \-s
# Silent mode, only the exit status is affected.
.SH EXAMPLES
.EX "tty " "Print the tty name"
.TP 20
.B tty
# Print the tty name
.SH DESCRIPTION
.PP
Print the name of the controlling tty. If the flag \fB\-s\fR is given,

View file

@ -15,8 +15,12 @@ umount \- unmount a mounted file system
# \\$2
..
.SH EXAMPLES
.EX "umount /dev/fd1" "Unmount diskette 1"
.EX "umount /mnt" "Unmount the file system mounted on /mnt"
.TP 20
.B umount /dev/fd1
# Unmount diskette 1
.TP 20
.B umount /mnt
# Unmount the file system mounted on /mnt
.SH DESCRIPTION
.PP
This command unmounts a file system identified by

View file

@ -17,16 +17,34 @@ uname, arch \- system info
# \\$2
..
.SH OPTIONS
.FL "\-s" "System name"
.FL "\-n" "Node/network name"
.FL "\-r" "Operating system release"
.FL "\-v" "Operating system version"
.FL "\-m" "Machine type"
.FL "\-p" "Processor family"
.FL "\-a" "Short for \fB\-snrvm\fR"
.TP 5
.B \-s
# System name
.TP 5
.B \-n
# Node/network name
.TP 5
.B \-r
# Operating system release
.TP 5
.B \-v
# Operating system version
.TP 5
.B \-m
# Machine type
.TP 5
.B \-p
# Processor family
.TP 5
.B \-a
# Short for \fB\-snrvm\fR
.SH EXAMPLES
.EX "uname -n" "Print the name of the system"
.EX "arch" "Print the name of the system architecture"
.TP 20
.B uname -n
# Print the name of the system
.TP 20
.B arch
# Print the name of the system architecture
.SH DESCRIPTION
.PP
\fIUname\fP and \fIarch\fP give information about the system. The options

View file

@ -15,9 +15,13 @@ unexpand \- convert spaces to tabs
# \\$2
..
.SH OPTIONS
.FL "\-a" "All spaces are unexpanded"
.TP 5
.B \-a
# All spaces are unexpanded
.SH EXAMPLES
.EX "unexpand oldfile >newfile" "Convert leading spaces to tabs"
.TP 20
.B unexpand oldfile >newfile
# Convert leading spaces to tabs
.SH DESCRIPTION
.PP
\fIUnexpand\fR replaces spaces in the named files with tabs.

View file

@ -15,12 +15,22 @@ uud, uudecode \- decode a binary file encoded with uue
# \\$2
..
.SH OPTIONS
.FL "\-n" "Do not verify checksums"
.FL "\-s" "Name of directory where \fI.uue\fR file is"
.FL "\-t" "Name of directory where output goes"
.TP 5
.B \-n
# Do not verify checksums
.TP 5
.B \-s
# Name of directory where \fI.uue\fR file is
.TP 5
.B \-t
# Name of directory where output goes
.SH EXAMPLES
.EX "uud file.uue " "Re-create the original file"
.EX "uud \- <file.uue" "The \- means use \fIstdin\fR"
.TP 20
.B uud file.uue
# Re-create the original file
.TP 20
.B uud \- <file.uue
# The \- means use \fIstdin\fR
.SH DESCRIPTION
.PP
\fIUud\fR decodes a file encoded with \fIuue\fR or

View file

@ -15,11 +15,19 @@ uue, uuencode \- encode a binary file to ASCII (e.g., for mailing)
# \\$2
..
.SH OPTIONS
.FL "\-\fIn\fR" "How many lines to put in each file"
.TP 5
.B \-\fIn\fR
# How many lines to put in each file
.SH EXAMPLES
.EX "uue file" "Encode \fIfile\fR to \fIfile.uue\fR"
.EX "uue file \- >x" "Encode \fIfile\fR and write on \fIstdout\fR"
.EX "uue \-800 file" "Output on \fIfile.uaa\fR, \fIfile.uab\fR etc."
.TP 20
.B uue file
# Encode \fIfile\fR to \fIfile.uue\fR
.TP 20
.B uue file \- >x
# Encode \fIfile\fR and write on \fIstdout\fR
.TP 20
.B uue \-800 file
# Output on \fIfile.uaa\fR, \fIfile.uab\fR etc.
.SH DESCRIPTION
.PP
\fIUuencode\fR is a famous program that converts an arbitrary (usually binary)

View file

@ -15,12 +15,22 @@ wc \- count characters, words, and lines in a file
# \\$2
..
.SH OPTIONS
.FL "\-c" "Print character count"
.FL "\-l" "Print line count"
.FL "\-w" "Print word count"
.TP 5
.B \-c
# Print character count
.TP 5
.B \-l
# Print line count
.TP 5
.B \-w
# Print word count
.SH EXAMPLES
.EX "wc file1 file2" "Print all three counts for both files"
.EX "wc \-l file" "Print line count only"
.TP 20
.B wc file1 file2
# Print all three counts for both files
.TP 20
.B wc \-l file
# Print line count only
.SH DESCRIPTION
.PP
.I Wc

View file

@ -15,7 +15,9 @@ whereis \- examine system directories for a given file
# \\$2
..
.SH EXAMPLES
.EX "whereis stat.h" "Prints: \fI/usr/include/sys/stat.h\fR"
.TP 20
.B whereis stat.h
# Prints: \fI/usr/include/sys/stat.h\fR
.SH DESCRIPTION
.PP
\fIWhereis\fR searches a fixed set of system

View file

@ -15,7 +15,9 @@ which \- examine $PATH to see which file will be executed
# \\$2
..
.SH EXAMPLES
.EX "which a.out" "Tells which \fIa.out\fR will be executed"
.TP 20
.B which a.out
# Tells which \fIa.out\fR will be executed
.SH DESCRIPTION
.PP
The $PATH shell variable controls the

View file

@ -15,7 +15,9 @@ who \- print list of currently logged in users
# \\$2
..
.SH EXAMPLES
.EX "who " "Print user names, terminals and times"
.TP 20
.B who
# Print user names, terminals and times
.SH DESCRIPTION
.PP
\fIWho\fR prints a list of currently logged in users. For each one,

View file

@ -15,11 +15,19 @@ write \- send a message to a logged-in user
# \\$2
..
.SH OPTIONS
.FL "\-c" "Use cbreak mode"
.FL "\-v" "Verbose mode"
.TP 5
.B \-c
# Use cbreak mode
.TP 5
.B \-v
# Verbose mode
.SH EXAMPLES
.EX "write ast" "Send a message to ast"
.EX "write ast tty00" "Send a message to ast on tty00"
.TP 20
.B write ast
# Send a message to ast
.TP 20
.B write ast tty00
# Send a message to ast on tty00
.SH DESCRIPTION
.PP
\fIWrite\fR lets a user send messages to another logged-in user.

View file

@ -15,7 +15,9 @@ yes \- an endless stream of the same word
# \\$2
..
.SH EXAMPLES
.EX "yes | script" "Answer yes to all questions from the script"
.TP 20
.B yes | script
# Answer yes to all questions from the script
.SH DESCRIPTION
.PP
\fIYes\fP sends out an endless stream of y's, each on one line. One

View file

@ -2,13 +2,27 @@
.TH ELVIS 1x
.CD "elvis \(en clone of the Berkeley vi editor"
.SX "elvis \fR[\fB\(enRerv\fR] [\fB\(ent \fItag\fR] \fR[\fIfile\fR] ..."
.FL "\(enR" "Set the read-only option"
.FL "\(ene" "Start up emulating \fIex\fR"
.FL "\(enr" "Tell the user to use \fIelvrec\fR instead
.FL "\(ent" "Start editing at the given tag"
.FL "\(env" "Start up emulating \fIvi\fR"
.EX "elvis" "Call the editor"
.EX "elvis prog.c" "edit \fIprog.c\fR"
.TP 5
.B \(enR
# Set the read-only option
.TP 5
.B \(ene
# Start up emulating \fIex\fR
.TP 5
.B \(enr
# Tell the user to use \fIelvrec\fR instead
.TP 5
.B \(ent
# Start editing at the given tag
.TP 5
.B \(env
# Start up emulating \fIvi\fR
.TP 20
.B elvis
# Call the editor
.TP 20
.B elvis prog.c
# edit \fIprog.c\fR
.PP
\fIElvis\fR is a full-screen editor closely modeled on the famous Berkeley
\fIvi\fR editor.

View file

@ -3,9 +3,15 @@
.CD "mined \(en \*(M2 editor"
.SX "mined\fR [\fIfile\fR]
.FL "\fR(none)"
.EX "mined /user/ast/book.3" "Edit an existing file"
.EX "mined" "Call editor to create a new file"
.EX "ls \(enl | mined" "Use \fImined\fR as a pager to inspect listing"
.TP 20
.B mined /user/ast/book.3
# Edit an existing file
.TP 20
.B mined
# Call editor to create a new file
.TP 20
.B ls \(enl | mined
# Use \fImined\fR as a pager to inspect listing
.PP
\fIMined\fR is a simple screen editor.
At any instant, a window of 24 lines is visible on the screen.

View file

@ -15,19 +15,43 @@ backup \- backup files
# \\$2
..
.SH OPTIONS
.FL "\-d" "At top level, only directories are backed up"
.FL "\-j" "Do not copy junk: \fI *.Z, *.bak, a.out, core\fR, etc"
.FL "\-m" "If device full, prompt for new diskette"
.FL "\-n" "Do not backup top-level directories"
.FL "\-o" "Do not copy \fI*.o\fR files"
.FL "\-r" "Restore files"
.FL "\-s" "Do not copy \fI*.s\fR files"
.FL "\-t" "Preserve creation times"
.FL "\-v" "Verbose; list files being backed up"
.FL "\-z" "Compress the files on the backup medium"
.TP 5
.B \-d
# At top level, only directories are backed up
.TP 5
.B \-j
# Do not copy junk: \fI *.Z, *.bak, a.out, core\fR, etc
.TP 5
.B \-m
# If device full, prompt for new diskette
.TP 5
.B \-n
# Do not backup top-level directories
.TP 5
.B \-o
# Do not copy \fI*.o\fR files
.TP 5
.B \-r
# Restore files
.TP 5
.B \-s
# Do not copy \fI*.s\fR files
.TP 5
.B \-t
# Preserve creation times
.TP 5
.B \-v
# Verbose; list files being backed up
.TP 5
.B \-z
# Compress the files on the backup medium
.SH EXAMPLES
.EX "backup \-mz . /f0" "Backup current directory compressed"
.EX "backup /bin /usr/bin" "Backup bin from RAM disk to hard disk"
.TP 20
.B backup \-mz . /f0
# Backup current directory compressed
.TP 20
.B backup /bin /usr/bin
# Backup bin from RAM disk to hard disk
.SH DESCRIPTION
.PP
\fIBackup\fR (recursively) backs up the contents of a given directory and its

View file

@ -15,8 +15,12 @@ badblocks \- put a list of bad blocks in a file
# \\$2
..
.SH EXAMPLES
.EX "badblocks /dev/hd1 " "Handle bad blocks on \fI/dev/hd1\fP"
.EX "badblocks /dev/hd3 310 570 1680 " "Three bad blocks on \fI/dev/hd3\fP"
.TP 20
.B badblocks /dev/hd1
# Handle bad blocks on \fI/dev/hd1\fP
.TP 20
.B badblocks /dev/hd3 310 570 1680
# Three bad blocks on \fI/dev/hd3\fP
.SH DESCRIPTION
.PP
If a device contains bad sectors, it is important to not have them

View file

@ -15,10 +15,16 @@ chown \- change owner
# \\$2
..
.SH OPTIONS
.FL "\-R" "Change directory hierarchies"
.TP 5
.B \-R
# Change directory hierarchies
.SH EXAMPLES
.EX "chown ast file1 file2" "Make \fIast\fR the owner of the files"
.EX "chown \-R ast:other dir" "Change the owner and group of all files in dir"
.TP 20
.B chown ast file1 file2
# Make \fIast\fR the owner of the files
.TP 20
.B chown \-R ast:other dir
# Change the owner and group of all files in dir
.SH DESCRIPTION
.PP
The owner field (and optionally group field) of the named files is changed

View file

@ -15,11 +15,19 @@ fdisk \- partition a hard disk [IBM]
# \\$2
..
.SH OPTIONS
.FL "\fB\-h" "Number of disk heads is \fIm\fR"
.FL "\fB\-s" "Number of sectors per track is \fIn\fR"
.TP 5
.B \fB\-h
# Number of disk heads is \fIm\fR
.TP 5
.B \fB\-s
# Number of sectors per track is \fIn\fR
.SH EXAMPLES
.EX "fdisk /dev/c0d0" "Examine disk partitions"
.EX "fdisk \-h9 /dev/c0d0" "Examine disk with 9 heads"
.TP 20
.B fdisk /dev/c0d0
# Examine disk partitions
.TP 20
.B fdisk \-h9 /dev/c0d0
# Examine disk with 9 heads
.SH DESCRIPTION
.PP
When \fIfdisk\fR starts up, it reads in the partition table and displays

View file

@ -17,9 +17,15 @@ mknod \- create a special file
# \\$2
..
.SH EXAMPLES
.EX "mknod /dev/plotter c 7 0" "Create special file for a plotter"
.EX "mknod /dev/fd3 b 2 3" "Create a device for diskette drive 3"
.EX "mknod /tmp/stream p" "Create a named pipe"
.TP 20
.B mknod /dev/plotter c 7 0
# Create special file for a plotter
.TP 20
.B mknod /dev/fd3 b 2 3
# Create a device for diskette drive 3
.TP 20
.B mknod /tmp/stream p
# Create a named pipe
.SH DESCRIPTION
.PP
.I Mknod

View file

@ -15,9 +15,13 @@ printroot \- print the name of the root device on standard output
# \\$2
..
.SH OPTIONS
.FL "\-r" "Print only the root device, not a full mtab line"
.TP 5
.B \-r
# Print only the root device, not a full mtab line
.SH EXAMPLES
.EX "printroot" "Print the name of the root device"
.TP 20
.B printroot
# Print the name of the root device
.SH DESCRIPTION
.PP
.I Printroot

View file

@ -221,11 +221,17 @@ Tells \fBRS\fR the system is about to shutdown and no system service should
be restarted upon termination.
.PP
.SH EXAMPLES
.EX "service up /sbin/is -period 5HZ" "Start the IS server and check its status every 5 seconds."
.TP 20
.B service up /sbin/is -period 5HZ
# Start the IS server and check its status every 5 seconds.
.br
.EX "service up /usr/sbin/dp8390 -args DPETH0=pci" "Start the DP8390 ethernet driver, passing one argument."
.TP 20
.B service up /usr/sbin/dp8390 -args DPETH0=pci
# Start the DP8390 ethernet driver, passing one argument.
.br
.EX "service down lance" "Stop the system service with label lance."
.TP 20
.B service down lance
# Stop the system service with label lance.
.br
.SH "SEE ALSO"
.PP

View file

@ -15,7 +15,9 @@ sync \- flush the cache to disk
# \\$2
..
.SH EXAMPLES
.EX "sync" "Write out all modified cache blocks"
.TP 20
.B sync
# Write out all modified cache blocks
.SH DESCRIPTION
.PP
\s-1MINIX 3\s-1

View file

@ -5,10 +5,12 @@ tcpd, tcpdp \- waits for a TCP connection request and starts a server
.B tcpd
.RB [ \-d ]
.RB [ \-m
.RI maxclients ]
.RI service
.RI program
.RB [ arg ... ]
.I maxclients
]
.I service
.I program
.RB [ arg ...
]
.SH DESCRIPTION
.de SP
.if t .sp 0.4
@ -75,9 +77,12 @@ to start.
\\fB\\$1\\fR
# \\$2
..
.TP 15n
.EX "tcpd telnet in.telnetd &" "wait for a telnet connection on the normal port"
.EX "tcpd 8000 in.httpd /etc/httpd8000.conf &" "wait for web page request on port 8000 and use a custom config file for the in.httpd program."
.TP 20
.B tcpd telnet in.telnetd &
# wait for a telnet connection on the normal port
.TP 20
.B tcpd 8000 in.httpd /etc/httpd8000.conf &
# wait for web page request on port 8000 and use a custom config file for the in.httpd program.
.P
Note that command lines must be terminated with "&" to return control to the
calling process, leaving the daemon executing as a background process.
@ -85,13 +90,17 @@ calling process, leaving the daemon executing as a background process.
The above examples show how tcpd might be invoked from /etc/rc or
another script that runs during system initialization. You will also
see this in the supplied startup scripts:
.EX "daemonize tcpd shell in.rshd" "daemonize is a shell function that tests whether a daemon is present and starts it if so, using the & to start it in the background."
.TP 20
.B daemonize tcpd shell in.rshd
# daemonize is a shell function that tests whether a daemon is present and starts it if so, using the & to start it in the background.
.P
Another case that should be mentioned is that when a system administrator
wants to start (or restart) a daemon from a command line,
.BR intr (8)
should be used, like this:
.EX "intr -d tcpd telnet in.telnetd &" "remove the daemon from a process group and connect its input to /dev/null and its output to /dev/log."
.TP 20
.B intr -d tcpd telnet in.telnetd &
# remove the daemon from a process group and connect its input to /dev/null and its output to /dev/log.
.SH FILES
.TP 25n
.B /etc/serv.access

View file

@ -15,7 +15,9 @@ update \- periodically write the buffer cache to disk
# \\$2
..
.SH EXAMPLES
.EX "update &" "Start a process that flushes the cache"
.TP 20
.B update &
# Start a process that flushes the cache
.SH DESCRIPTION
.PP
When the system is booted,