SysIII/usr/src/man/docs/synopsis

'\" ` ``
'\" ' ''
'\" _ \(em
'\" C C
'\" c sccs
'\" d dec
'\" e pdp
'\" v vax
'\" i ibm
'\" p1 unix/ts
'\" p2 Unix/ts
'\" r rje
'\" s []
'\" u1 unix
'\" u2 Unix
'\" x \(mu
.hw hexa-decimal tuto-rial
.tr ~
.po +.25i
.nr b \n(.ou\"
.nr c \w'\fB\s-1\0.~~\s+1\fP'u\"
.PH"''''"
.PF"''\s-1\fB\\\\nP\fP\s+1''"
.de HX
.ne 4v
.if \\$2-2 .ds }0 \\na.\\*(}0
.if \\$1-1 .po -\\ncu\"
..
.de HZ
.if \\$2-1 .if !\\$2-2 .nr a \\n(H2
.if \\$1-1 .po \\nbu\"
..
.if n .ds s []\"
'\".if t .ds s \s-2\|\^\v'.12m'\fB\(sq\fP\v'-.12m'\s+2\"
.if t .ds s \s-2\|\^\fB\(sq\fP\s+2\"
.de Li
.LI "\*s~\|\s-2\\$1~~\\$2\s+2"
..
.ds HF 3 3 3 2
.nr Hb 4
.nr Hc 1
.nr Hi 0
.nr Hs 3
.nr Ht 1
.nr Hu 1
.nr Cl 3
.nr Pt 0
.if n .ds ` ""\"
.if t .ds ` ``\"
.if n .ds ' ""\"
.if t .ds ' ''\"
.if n .ds _ " -- \"
.if t .ds _ \(em\"
.ds C \s-1\fBC\fP\s+1
.ds c \s-2SCCS\s+2\"
.ds d \s-2DEC\s+2\"
.ds e \s-2PDP\s+2\"
.ds v \s-2VAX\s+2\"
.ds i \s-2IBM\s+2\"
.ds p1 \s-2UNIX/TS\s+2\"
.ds p2 U\s-2NIX/TS\s+2\"
.ds r \s-2RJE\s+2\"
.ds u1 \s-2UNIX\s+2\"
.ds u2 U\s-2NIX\s+2\"
.if n .ds x x\"
.if t .ds x \(mu\"
.TL
U\s-2NIX/TS\s+2\*_Overview \|and \|Synopsis \|of \|Facilities
.AU "T. A. Dolotta" TAD MH 3624 7797 2F-207
.AU "R. C. Haight" RCH MH 3624 7498 2F-211
.MT 4
.EH "'\s-1\fB\\\\nP\fP''\fIU\s-2NIX/TS\s+2\fP\s+1'"
.OH "'\s-1\fIOverview~\|and~\|Synopsis~\|of~\|Facilities\fP''\fB\\\\nP\fP\s+1'"
.de TP
'sp 1.5v
.po -\\ncu\"
.lt +\\ncu\"
.if e 'tl \\*(}e\"
.if o 'tl \\*(}o\"
.lt -\\ncu\\"
.po \\nbu\\"
'sp 1.5v
..
.rs
.SP 1v
.HU "OVERVIEW"
.SP 1v
\*(p2
is the centrally supported version of \*(u1*.
.FS *
UNIX is a trademark of Bell Laboratories.
.FE
This document describes basic software facilities and hardware requirements.
.H 2 "UNIX\|~TIME-SHARING\|~SYSTEM"
The \*(u1 time-sharing system
is
a general-purpose, multi-user, interactive operating system
specifically engineered to make the
designer's, programmer's, and documenter's computing environment
simple, efficient, flexible, and productive.
\*(p2 contains features such as:
.BL "" 1
.LI
A hierarchical file system.
.LI
A flexible, easy-to-use command language; can be \*`tailored\*' to meet specific user needs.
.LI
Ability to execute sequential, asynchronous, and background processes.
.LI
A powerful context editor.
.LI
Very flexible document preparation and text processing systems.
.LI
A high-level programming language conducive to structured programming
(\*C).
.LI
The programming languages
\s-2FORTRAN\s+2
and an interractive language in the spirit of
Basic.
.LI
Symbolic debugging systems.
.LI
A variety of system programming tools (e.g., compiler-compilers).
.LI
Sophisticated \*`desk-calculator\*' packages.
.LE 1
.P
The central processing units (\s-2CPU\s+2s) for \*(p1 are the
Digital Equipment Corporation's (\*d)
\*e-11/23, /34, /45, /70, and \*v-11/780 computers.
Although \*(p1 can run on hardware
costing less than $20,000,
a typical \*(p1 system costs about $250,000 and
can support
32-40 simultaneous users.
The cost per user-hour of \*(p1
is significantly lower than that of most other interactive computer systems.
\*(p2 typically runs unattended.
.P
The \*(p1 file system consists of a highly-uniform set
of directories and files arranged in a tree-like
hierarchical structure.
Some of its features are:
.BL "" 1
.LI
Simple and consistent naming conventions;
names can be absolute, or relative to any directory in the file system
hierarchy.
.LI
Mountable and de-mountable file systems and volumes.
.LI
File linking across directories.
.LI
Automatic file space allocation and de-allocation that is invisible to users.
.LI
A complete set of flexible
directory and file protection modes;
allows all combinations of
.I "read, write,"
and
.I "execute"
access, independently for the owner of
each file or directory,
for a group of users (e.g., all members of a project), and for
all other users;
protection
modes can be set dynamically.
.LI
Facilities for creating, accessing, moving, and processing files, directories, or sets
of these in a simple, uniform, and natural way.
.LI
Each physical \s-2I/O\s+2 device, from interactive terminals to main memory, is treated
like a file, allowing uniform file and device \s-2I/O\s+2.
.LE 1
.H 2 "UNIX\|~COMMAND\|~LANGUAGE"
Unlike other interractive command languages, the \*(u1 Shell is a full
programming language.
The Shell provides settable variables, conditional and iterative constructs,
and a user environment that can be tailored an individual's or group's needs.
Any non-restricted user can create new commands using Shell scripts.
.PF "''''"
.H 2 "DOCUMENT\|~PREPARATION\|~AND\|~TEXT\|~PROCESSING"
In a software development project of any appreciable size,
the production of usable, accurate documentation may well consume more effort
than the production of the software itself.
Several years of experience with many projects that use \*(p1 have shown that
document preparation should not be separated from
software development,
and that
the combination of a flexible operating system,
a powerful command language,
and good text processing facilities permits quick and convenient production of
many kinds of documentation that might be otherwise unobtainable,
impractical, or very expensive.
.P
In \*(p1, one also obtains a very useful \*`word processing\*' system\*_an
editing system,
text formatting systems,
a typesetting system,
and spelling and typographical error-detection facilities.
The document preparation and text processing facilities of \*(p1
include commands
that automatically control
pagination,
style of paragraphs, line justification, hyphenation,
multi-column pages,
footnote placement,
generation of marginal revision bars,
generation of tables of contents,
etc.,
for specialized
documents such as program run books, or for general documents such as
letters, memoranda, legal briefs,
etc.
There are also excellent facilities for formatting and typesetting complex tables
and equations.
This document was produced in its entirety by
these facilities.
.SP 2v
.HU "HARDWARE"
.SP 1v
\*(p2 supported hardware configurations are listed below:
.tr ~
.TS
center box ;
l | c | c | c | c | c .
CPU/console	PDP-11/23	PDP-11/34	PDP-11/45	PDP-11/70\(dg	VAX-11/780
~~(LA-36 or LA-120)\(dd
_
Memory\(dd:	256KB	256KB	256KB	.5-1MB	1-2MB
Floating Point\(dd:	FP11	FP11-A	FP11-B	FP11-C	FP780
Disks\(dd:
~~RL01 (2 drives)	x	x	x	-	-
~~RL02	\(**	\(**	x	-	-
~~RK05 (2 drives)	-	o	o	-	-
~~RP03	-	-	o	-	-
~~RP04,5\(**\(**	-	o(U-bus)	o(U-bus)	o(M-bus)	o(M-bus)
~~RP06\(**\(**	-	x(U-bus)	\(**(U-bus)	\(**(M-bus)	\(**(M-bus)
Fixed-head:
~~RF11	-	-	o	-	-
~~RS03,4	-	-	n(U-bus)	n(M-bus)	-
Tape:
~~TU10	-	o	o	-	-
~~TU16	-	o	o	o	-
~~TE16	-	\(**	\(**	\(**	\(**
~~TU45	-	-	-	x	x
Async Interfaces:
~~DLV11	x	-	-	-	-
~~DL11-E	-	x	x	x	-
~~DZ11	-	x	x	x	x
~~KMC11B/DZ	-	\(**	\(**	\(**	\(**
~~DH11	-	o	o	o	-
Sync Interfaces:
~~KMC11B/DMC	-	x	x	x	x
~~~~line unit
~~DMC11	-	x	x	x	x
~~DU11	-	o	o	o	-
~~DQS11B	-	-	o	o	-
Auto Call:
~~DN11AA/DA	-	x	x	x	x
Parallel Interface:
~~DRV11?	x	-	-	-	-
~~DR11C	-	x	x	x	?
~~DR11B	-	x	x	x	-
~~DA11B	-	n	n	n	-
Printers:
~~LP11 (or equiv.)	-	x	x	x	x
~~Versatec (DMA)	-	x	x	x	x
_
Max. Users	4	8	16-24	32-40	48+
~~(an estimate)
.TE
.DS
Key:	\(dd = required
	\(dg = power-fail recovery provided
	\(**\(** = full ECC correction provided
	\(** = first choice
	x = supported
	o = driver provides for obsolete device
	n = driver provided\-device not recommended
.DE
.P
You will also want full-ASCII, full duplex terminals, some suitable for word-processing
output.
To achieve the number of users given above, you will need a fairly large configuration
with a disk drive set aside for the root file system.
An add-on cache for the 11/34 or /45 is generally worthwhile.
.SP 2v
.HU "SOFTWARE,\|~FACILITIES,\|~AND\|~DOCUMENTATION"
.SP 1v
The most-often-used \*(p1
commands are listed below.
Every command, including all options, is issued as a single
line, unless specifically described below as being \*`interactive.\*'~
Interactive programs can be made to run from a prepared \*`script\*'
simply by redirecting their input.
All commands are described in the \*(p2 User's Manual
(see Section~7 below).
Commands for which additional manuals and tutorials are provided
are marked with [m] and [t], respectively.
All manuals and tutorials are listed in Section~8 below.
.P
File processing commands
that go from standard input to standard output
are called \*`filters\*' and are marked with [f].
The \*`pipe\*' facility of the Shell may be used
to connect filters directly to the input or output
of other filters and programs.
.P
Almost all of \*(p1 is written in \*C.
\*(p2 is totally self-supporting:
it contains all the software that is needed to
generate it, maintain it, and modify it.
Source code is included except as noted below.
.P
The system is normally distributed on a 9-track, 800-\s-2BPI\s+2
magnetic tape.
.H 2 "BASIC\|~SOFTWARE"
It
includes the time-sharing operating
system with utilities, an assembler, and a
compiler for the programming language \*C\(emenough
software
to regenerate,
maintain, and modify \*(p1 itself,
and to write and run new applications.
.H 3 "Operating\|~System"
.VL 18 1
.Li UNIX [m,t]
The basic resident code
on which everything else depends.
Executes the system calls, maintains the file system,
and manages the system's resources;
contains device drivers, \s-2I/O\s+2 buffers, and other
system information.
A general description of \*(u1 design
philosophy and system facilities appeared in
the
.I "Communications of the \s-2ACM\s+2".
A more extensive survey is in the
.I "Bell System Technical Journal"
for July-August 1978
(see Section~8 below).
Further capabilities include:
.BL "" 1
.LI
Automatically-supported reentrant code.
.LI
Separation of instruction and data spaces.
.LI
Timer-interrupt sampling and interprocess monitoring
for debugging and measurement.
.LE
.LI "\*s~\|Devices"
All \s-2I/O\s+2 is logically synchronous.
Normally, automatic buffering by the system makes the physical
record structure invisible and exploits the
hardware's ability to do overlapped \s-2I/O\s+2.
Unbuffered physical record
\s-2I/O\s+2 is available for unusual applications.
Software drivers are provided for the devices listed above in the section on
\s-2HARDWARE\s+2;
others can be easily written.
.H 3 "User\|~Access\|~Control"
.VL 18 1
.Li LOGIN
Signs on a new user:
.BL "" 1
.LI
Adapts to characteristics of terminal.
.LI
Verifies password and establishes user's
individual and group (project) identity.
.LI
Establishes working directory.
.LI
Publishes message of the day.
.LI
Announces presence of mail.
.LI
Executes an optional user-specified profile.
.LI
Starts command interpreter (\fIShell\|\fP) or other user-specified program.
.LE 1
.Li PASSWD
Changes a password:
.BL "" 1
.LI
User can change own password.
.LI
Passwords are kept encrypted for security.
.LE 1
.Li NEWGRP
Changes working group (project ID).
This provides access with protection for groups of related users.
.Li STTY
Sets up options for optimal control of a terminal.
In so far as they are deducible from the input, these
options are set automatically by \s-2LOGIN\s+2:
.BL "" 1
.LI
Parity.
.LI
Mapping of upper-case characters to lower case.
.LI
Carriage-return plus line-feed versus new-line.
.LI
Interpretation of tab characters.
.LI
Delays for tab, new-line, and carriage-return characters.
.LI
Raw versus edited input.
.LE 1
.Li TABS
Sets terminal's tab stops.
Knows several \*`standard\*' formats.
.LE 1
.H 3 "Manipulation\|~of\|~Files\|~and\|~Directories"
.VL 18 1
.Li ED [f,m,t]
Interactive context editor.
Random access to all lines of a file.
It can:
.BL "" 1
.LI
Find lines by number or pattern (regular expressions).
Patterns can include:
specified characters,
\*`don't care\*' characters,
choices among characters,
(specified numbers of)
repetitions of these constructs,
beginning of line,
end of line.
.LI
Add, delete, change, copy, or move lines.
.LI
Permute contents of a line.
.LI
Replace one or more instances of a pattern within a line.
.LI
Combine or split lines.
.LI
Combine or split files.
.LI
Escape to Shell (\*(p1 command language) during editing.
.LI
Do any of above operations on
every line (in a given range) that matches a pattern.
.LE 1
.Li SED [f]
A stream (one-pass) editor with facilities similar to those of \s-2ED\s+2.
.Li CAT [f]
Concatenates one or more files onto standard output.
Mostly used for \%unadorned printing, for
inserting data into a \*`pipe,\*'
and for buffering output that comes in dribs and drabs.
.Li PR [f]
Prints files with title, date, and page number on every page:
.BL "" 1
.LI
Multi-column output.
.LI
Parallel column merge of several files.
.LE 1
.Li SPLIT
Splits a large file into more manageable pieces.
.Li SUM
Computes the check sum of a file.
can be read.
.Li DD [f]
Physical file format translator,
for exchanging data with non-\*(u1
systems, especially \s-2OS\s+2/360, \s-2VS\s+21, \s-2MVS\s+2, etc.
.Li CP
Copies one file to another.
Works on any file regardless of its contents.
.Li RM
Removes file(s).
If any names are linked to the file,
only the name being removed goes away.
.Li LN
Links another name (alias) to an existing file.
.Li MV
Moves a file.
Used for renaming files or directories.
.Li CHMOD
Changes access permissions on file(s).
Executable by owner of file(s),
or by the super-user.
.Li CHOWN
Changes owner of file(s).
.Li MKDIR
Makes one or more new directories.
.Li RMDIR
Removes one or more (empty) directories.
.Li CD
Changes working (i.e., current) directory.
.Li FIND
Searches the directory
hierarchy for,
and performs specified commands on,
every file that meets
given criteria:
.BL "" 1
.LI
File name matches a given pattern.
.LI
Modified date in given range.
.LI
Date of last use in given range.
.LI
Given permissions.
.LI
Given owner.
.LI
Given special file characteristics.
.LI
Any logical combination of the above.
.LI
Any directory can be the starting \*`node.\*'
.LE 1
.Li CPIO
Copies a sub-tree of the file system
(directories, links, and all)
to another place in the file system.
Can also copy a sub-tree onto a tape, and
later recreate it from tape.
Often used with the
.I find
command.
.LE 1
.H 3 "Execution\|~of\|~Programs"
.VL 18 1
.Li SH [f,t]
The Shell, or command language interpreter,
understands a set of constructs that constitute a full programming language;
it allows a user or a command procedure to:
.BL "" 1
.LI
Supply arguments to and run any executable program.
.LI
Redirect standard input, standard output, and standard error files.
.LI
Pipes:
simultaneous execution with output of one process connected
to the input of another.
.LI
Compose compound commands using:
.br
.ns
.in +2
if ... then ... else,
.br
case switches,
.br
while loops,
.br
for loops over lists,
.br
break, continue and exit,
.br
parentheses for grouping.
.in -2
.LI
Initiate background processes.
.LI
Perform Shell programs, i.e., command scripts with
substitutable arguments.
.LI
Construct argument lists from all file names
satisfying specified patterns.
.LI
Take special action on traps and interrupts.
.LI
User-settable search path for finding commands.
.LI
Executes user-settable profile upon login.
.LI
Optionally announces presence of mail as it arrives.
.LI
Provides variables and parameters with default setting.
.LE
.Li TEST
Tests argument values in Shell conditional constructs.
.BL "" 1
.LI
String comparison.
.LI
File nature and accessibility.
.LI
Boolean combinations of the above.
.LE
.Li EXPR
String computations for calculating command arguments.
.BL "" 1
.LI
Integer arithmetic
.LI
Pattern matching
.LI
Like
.I test
above,
.I expr
can be used for conditional side-effect.
.LE
.Li ECHO
Prints its arguments on the standard output.
Useful for diagnostics or prompts in Shell procedures,
or for inserting data into a \*`pipe.\*'
.Li RSH
Restricted Shell;
restricts a user to a subset of \*(p1 commands.
The system administrator may construct different levels of restriction.
.Li SLEEP
Suspends execution for a specified time.
.Li WAIT
Waits for termination of processes that are running asynchronously.
.Li NOHUP
Runs a command immune to \*`hanging up\*' the terminal.
.Li NICE
Runs a command in low (or high) priority.
.Li KILL
Terminates named process(es).
.Li CRON
Performs actions at specified times:
.BL "" 1
.LI
Actions are arbitrary Shell procedures or executable programs.
.LI
Times are
conjunctions of month, day of month, day of week, hour,
and minute.
Ranges are specifiable for each.
.LE 1
.Li TEE [f]
Passes data between processes (like a \*`pipe\*'), but also diverts copies into
one or more files.
.LE 1
.H 3 "Status\|~Inquiries"
.VL 18 1
.Li LS
Lists the names of one, several, or all files in one or more directories:
.BL "" 1
.LI
Alphabetic or chronological sorting, up or down.
.LI
Optional information:
size,
owner,
group,
date last modified,
date last accessed,
permissions.
.LE 1
.Li FILE
Tries to determine
what kind of information is in a file by consulting
the file system index and by reading the file itself.
.Li DATE
Print current date and time.
Has considerable knowledge
of calendrical and horologic peculiarities;
can be used to set \*(p1's idea of date and time.
(As yet, cannot cope with Daylight Saving Time in the Southern Hemisphere.)
.Li DF
Reports amount of free space in file system.
.Li DU
Prints a summary of total space occupied by all files in a hierarchy.
.Li TTY
Prints the \*`name\*' of your terminal (i.e., the name of the port to which
your terminal is connected).
.Li WHO
Tells who is logged into the system:
.BL "" 1
.LI
Lists logged-in users,
their ports, and time they logged in.
.LI
Optional history of all logins and logouts.
.LI
Tells you who you are logged in as.
.LE 1
.Li PS
Reports on active processes:
.BL "" 1
.LI
Lists your own or everybody's processes.
.LI
Tells what commands are being executed at the moment.
.LI
Optional status information:
state and scheduling information,
priority,
attached terminal,
what the process is waiting for,
and its size.
.LE 1
.Li PWD
Prints name of your working (i.e., current) directory.
.LE 1
.H 3 "Inter-User\|~Communication"
.VL 18 1
.Li MAIL
Mails a message to one or more users.
Also used to read and dispose of incoming mail.
The presence of mail is announced by \s-2LOGIN\s+2.
.Li CALENDAR
An automatic reminder service.
.Li WRITE
Establishes direct, interactive terminal-to-terminal communication with another user.
.Li WALL
Writes to all users who are logged in.
.Li MESG
Inhibits or permits receipt of messages from \s-2WRITE\s+2 and \s-2WALL\s+2.
.LE 1
.H 3 "Program\|~Development\|~Package"
A kit of fundamental programming tools.
Some of these utilities are used as integral parts of
the higher-level languages described in Section~2 below.
.VL 18 1
.Li AR
Maintains library archives.
Combines several files into one for housekeeping efficiency:
.BL "" 1
.LI
Creates new archive.
.LI
Updates archive by date.
.LI
Replaces or deletes files.
.LI
Prints table of contents.
.LI
Retrieves from archive.
.LE 1
.Li AS [m]
Assembler:
.BL "" 1
.LI
Creates object program consisting of:
.br
.ns
.DL "" 1
.LI
Code, possibly read-only.
.LI
Initialized data or read-write code.
.LI
Uninitialized data.
.LE
.LI
Relocatable object code is executable without
further transformation.
.LI
Object code normally includes a symbol table (that can be deleted).
.LI
Several source files can be assembled together.
.LI
Local labels.
.LI
Conditional assembly.
.LI
\*`Conditional jump\*' instructions become
branches or branches plus jumps, depending on distance.
.LE 1
.LI "\*s~\|Library"
The basic run-time library.
It is used freely by all system software:
.BL "" 1
.LI
Number conversions.
.LI
Time conversions.
.LI
Mathematical functions:
.ul
sin, cos, log, exp, atan, sqrt, gamma.
.LI
Buffered character-by-character \s-2I/O\s+2.
.LI
Random number generator.
.LI
An elaborate library for formatted \s-2I/O~~[m]\s+2.
.LI
Password encryption.
.LE 1
.Li ADB [t]
Interactive debugger.
.BL "" 1
.LI
Postmortem dumping.
.LI
Examination of arbitrary files, with no limit on size.
.LI
Interactive breakpoint debugging with the debugger as a separate
process.
.LI
Symbolic reference to local and global variables.
.LI
Stack trace for \*C programs.
.LI
Output formats:
.in+2
.nf
1-, 2-, or 4-byte integers in octal, decimal, or hex
.br
single and double floating point
.br
character and string
.br
disassembled machine instructions
.br
.fi
.in-2
.LI
Patching.
.LI
Searching for integer, character, or floating patterns.
.LI
Handles separated instruction and data space.
.LE 1
.Li OD [f]
Dumps any file:
.BL "" 1
.LI
Output options include:
octal or decimal by words,
octal by bytes,
\s-2ASCII\s+2,
operation codes,
hexadecimal,
or any combination thereof.
.LI
Range of dumping is controllable.
.LE 1
.Li LD
Linkage editor.
Combines relocatable object files.
Inserts required routines from specified libraries; resulting code:
.BL "" 1
.LI
Can be made sharable.
.LI
Can be made to have separate instruction and data spaces.
.LE 1
.Li NM
Prints the \f2namelist\fP (symbol table) of an object program.
Provides control over the style and order of
names that are printed.
.Li SIZE
Reports the main memory requirements
of one or more object files.
.Li STRIP
Removes the relocation and symbol table information from
an object file to save file space.
.Li PROF
Constructs a profile of time spent in each routine
from data gathered by time-sampling the
execution of a program;
gives subroutine call frequencies and average times for \*C programs.
.Li MAKE [m]
Controls creation of large programs.
Uses a control file specifying source file dependencies
to make new version;
uses time last changed to deduce minimum amount of work necessary.
.BL "" 1
.LI
Knows about CC, YACC, LEX, etc.
.LE 1
.H 3 "Utilities"
.VL 18 1
.Li CREF
Makes cross-reference listings of a set of files.
Each symbol is listed together with file name, line number within file, and
text of each line in which it occurs:
.BL "" 1
.LI
Assembler or \*C language
files can be cross-referenced.
.LI
Gathers or suppresses references to selected symbols.
.LI
Various ways to
sort output are available.
.LI
Allows selective printing of uniquely occurring symbols.
.LE 1
.Li SORT [f]
Merges and/or sorts \s-2ASCII\s+2 files line-by-line:
.BL "" 1
.LI
In ascending or descending
order.
.LI
Lexicographically or on numeric key.
.LI
On multiple keys located by delimiters or by position.
.LI
Can fold upper-case characters together with lower-case into dictionary order.
.LE 1
.Li UNIQ [f]
Deletes successive duplicate lines
in a file:
.BL "" 1
.LI
Prints lines that were originally unique,
duplicated, or both.
.LI
Can give redundancy count for each line.
.LE 1
.Li TR [f]
Does character translation according to
an arbitrary code:
.BL "" 1
.LI
Can \*`squeeze out\*' repetitions of selected characters.
.LI
Can delete selected characters.
.LE 1
.Li DIFF [f]
Reports line changes, additions, and deletions necessary to bring two files
into agreement;
can produce an editor script to convert one file into another.
.Li COMM [f]
Identifies common lines in two sorted files.
Output in up to 3 columns shows lines present in first file only,
present in second file only, and/or present in both.
.Li CMP
Compares two files and reports disagreeing bytes.
.Li GREP [f]
Prints all lines in one or more files that match
a pattern of the kind used by \s-2ED\s+2 (the editor):
.BL "" 1
.LI
Can print all lines that fail to match.
.LI
Can print count of \*`hits.\*'
.LE 1
.Li AWK [m]
Pattern scanning and processing language.
Searches input for patterns, and
performs actions on each line of input that satisfies
the pattern.
.BL "" 1
.LI
Patterns include regular expressions,
arithmetic and lexicographic conditions,
boolean combinations and ranges of these.
.LI
Data treated as string or numeric as appropriate.
.LI
Can break input into fields;
fields are variables.
.LI
Variables and arrays (with non-numeric subscripts).
.LI
Full set of arithmetic operators and control flow.
.LI
Multiple output streams to files and pipes.
.LI
Output can be formatted as desired.
.LI
Multi-line capabilities.
.LE 1
.Li WC [f]
Counts lines and \*`words\*' (strings separated by blanks or tab characters) in a file.
.Li TIME
Runs a command and reports timing information about it.
.LE 1
.H 2 "PROGRAMMING\|~LANGUAGES"
.H 3 "The\|~Programming\|~Language\|~C"
.VL 18 1
.Li CC [m,t]
Compiles and/or link-edits programs in the \*C
language.
The \*(p1 operating system, almost all of its
subsystems, and \*C itself are written in \*C:
.BL "" 1
.LI
General-purpose language
designed for structured programming.
.LI
Data types:
.br
.ns
.DL "" 1
.LI
Character.
.LI
Integer.
.LI
Long integer.
.LI
Floating-point.
.LI
Double.
.LI
Pointers to all types.
.LI
Functions returning all types.
.LI
Arrays of any type.
.LI
Structures containing various types.
.LI
Provides machine-independent control
of all machine facilities, including to-memory
operations and
pointer arithmetic.
.LI
Macro-preprocessor for parameterized code and for the inclusion of
other files.
.LI
All procedures recursive, with parameters passed by value.
.LI
Object code uses full
addressing capability of the \*e-11.
.LI
Run-time library gives access to all system facilities.
.LE
.LE 1
.Li CB [f]
\*C beautifier: gives a \*C program that well-groomed, structured, indented look.
.LE 1
.H 3 "\s-2FORTRAN\s+2"
.VL 18 1
.Li F77
A full compiler for 
ANSI Standard Fortran 77.
.BL "" 1
.LI
Compatible with C and supporting tools at object level.
.LI
Optional source compatibility with Fortran 66.
.LI
Free format source.
.LI
Optional subscript-range checking, detection of uninitialized variables.
.LI
All widths of arithmetic:
2- and 4-byte integer; 4- and 8-byte real; 8- and 16-byte
complex.
.LE 1
.Li RATFOR
Ratfor adds rational
control structure \o'a\(ga' la C to Fortran.
.BL "" 1
.LI
Compound statements.
.LI
If-else, do, for, while,
repeat-until, break, next
statements.
.LI
Symbolic constants.
.LI
File insertion.
.LI
Free format source
.LI
Translation of relationals like >, >=.
.LI
Produces genuine Fortran to carry away.
.LI
May be used with F77.
.LE 1
.Li STRUCT
Converts ordinary ugly Fortran into structured Fortran (i.e., Ratfor),
using statement grouping, if-else, while, for, repeat-until.
.LE 1
.H 3 "Other\|~Algorithmic\|~Languages"
.VL 18 1
.Li BS
An interactive interpreter, containing features of both Basic and Snobol4.
.BL "" 1
.LI
Statements include:
.br
.ns
.DL "" 1
.LI
for/while \f3...\fP next
.LI
goto
.LI
if \f3...\fP else \f3...\fP fi
.LI
trace
.LI
symbolic dump
.LI
run
.LE
.LI
All numeric calculations in double precision.
.LI
Recursive function defining and calling.
.LI
Built-in functions include
.ul2
log, exp, sin, cos, atan, ceil, floor,
sqrt, abs, rand.
.LI
String operations include regular expression pattern matching.
.LI
Very general I/O (including pipes to commands) is provided.
.LE 1
.Li DC [m]
Interactive programmable desk calculator.
Has named storage locations, as well
as conventional stack for holding integers and programs:
.BL "" 1
.LI
Arbitrary-precision decimal arithmetic.
.LI
Appropriate treatment of decimal fractions.
.LI
Arbitrary input and output radices, in particular
binary, octal, decimal, and hexadecimal.
.LI
Postfix (\*`Reverse Polish\*') operators:
.br
.ns
.DS 1
\fB+~~\-~~\v'.2m'*\v'-.2m'~~/\fP
remainder, power, square root
load, store, duplicate, clear
print, enter program text, execute
.DE
.LE 1
.Li BC [m]
A \*C-like interactive interface to the desk calculator \s-2DC\s+2:
.BL "" 1
.LI
All the capabilities of \s-2DC\s+2 with a high-level syntax.
.LI
Arrays and recursive functions.
.LI
Immediate evaluation of expressions and evaluation of
functions upon call.
.LI
Arbitrary-precision elementary functions:
.ul
exp, sin, cos, atan.
.LI
Goto-less programming.
.LE 1
.Li SNO
An interpreter very similar to \s-2SNOBOL\s+2 3;
its limitations are:
.BL "" 1
.LI
Function definitions are static.
.LI
Pattern matches are always anchored.
.LI
No built-in functions.
.LE 1
.LE 1
.H 3 "Macroprocessors\|~and\|~Compiler-Compilers"
.VL 18 1
.Li M4 [f,m]
A general-purpose macroprocessor:
.BL "" 1
.LI
Stream-oriented, recognizes macros anywhere in text.
.LI
Integer arithmetic.
.LI
String and substring capabilities.
.LI
Condition testing, file manipulation, arguments.
.LE 1
.Li YACC [m]
An \s-2LR\s+2(1)-based compiler-writing system.
During execution of resulting
parsers, arbitrary \*C functions can be
called to do code generation or take semantic actions:
.BL "" 1
.LI
B\s-2NF\s+2 syntax specifications.
.LI
Precedence relations.
.LI
Accepts formally ambiguous grammars
with non-\s-2BNF\s+2 resolution rules.
.LE 1
.Li LEX [m]
L\s-2EX\s+2 helps write programs whose control flow is directed by instances
of regular expressions in the input stream.
It is well suited for editor-script type
transformations
and for segmenting input in preparation for a parsing routine.
.LE 1
.H 2 "TEXT\|~PROCESSING"
.H 3 "Formatters"
High-level formatting macros have been developed
to ease the task of preparing documents with \s-2NROFF\s+2 and \s-2TROFF\s+2,
as well as to exploit its more complex formatting capabilities.
.VL 18 1
.Li NROFF [f,m,t]
Advanced formatter for terminals.
Capable of many elaborate feats:
.BL "" 1
.LI
Justification of either or both margins.
.LI
Automatic hyphenation.
.LI
Generalized page headers and footers,
automatic page numbering,
with even-odd page differentiation capability, etc.
.LI
Hanging indents and one-line indents.
.LI
Absolute and relative parameter settings.
.LI
Optional legal-style numbering of output lines.
.LI
Nested or chained input files.
.LI
Complete page format control, keyed to dynamically-planted
\*`traps\*' at specified lines.
.LI
Several separately-definable formatting environments (e.g., one for
regular text, one for footnotes, and one for \*`floating\*' tables and displays).
.LI
Macros with substitutable arguments.
.LI
Conditional execution of macros.
.LI
Conditional insertion or deletion of text.
.LI
String variables
that can be invoked
in mid-line.
.LI
Computation and printing of numerical quantities.
.LI
String-width computations for unusually-difficult layout problems.
.LI
Positions and distances expressible in inches, centimeters, ems, ens,
line spaces, points,
picas,
machine units,
and arithmetic combinations thereof.
.LI
Dynamic (relative or absolute) positioning.
.LI
Horizontal and vertical line drawing.
.LI
Multi-column output on terminals capable of reverse line-feed,
or through the postprocessor \s-2COL\s+2.
.LE 1
.Li TROFF [f,m,t]
This software generates output on a Graphic Systems, Inc.,
\s-2C/A/T\s+2 System/1
phototypesetter.
It provides facilities that are upward-compatible with \s-2NROFF\s+2,
but with the following additions:
.BL "" 1
.LI
Vocabulary of several 102-character fonts (any 4 simultaneously)
in 15 different point sizes.
.LI
Character-width and string-width computations for unusually difficult
layout problems.
.LI
Overstrikes and built-up brackets.
.LI
Dynamic (relative or absolute) point size selection,
globally or at the character level.
.LI
Terminal output for rough sampling of the product.
.LE 1
.LE
.tl @@\(rh~~~\fIThis entire document was typeset by \s-2TROFF\s+2, \
assisted by \s-2\fP\fB\-\fP\fIMM\s+2, \s-2TBL\s+2, and \s-2EQN\s+2.\fP~~~~\(lh@@
.VL 18 1
.Li EQN [f,m]
A mathematical preprocessor for \s-2TROFF\s+2.
Translates in-line or displayed formulae from a very easy-to-type form into
detailed typesetting instructions.
For example:
.DS 1
.ss 14
\!.ss 14
.br
sigma sup 2 = 1 over N sum from j=1 to N ( x sub j - x bar ) sup 2
.br
.ss 12
\!.ss 12
.DE
produces:
.in +1.5i
.DS
.EQ
sigma sup 2 \^=\| 1 over N sum from j=1 to N ( x sub j - x bar ) sup 2
.EN
.DE
.in -1.5i
.BL "" 1
.LI
Automatic calculation of point size changes for subscripts, superscripts, sub-subscripts,
etc.
.EQ
delim $$
.EN
.LI
Full vocabulary of Greek letters, such as
$gamma$, \v'-.26m'$size 8 { prod }$\v'.26m',
$GAMMA$, $alpha$.
.LI
Automatic calculation of the size of large brackets.
.LI
Vertical \*`piling\*' of formulae for matrices, conditional
alternatives, etc.
.LI
Integrals, sums, etc., with arbitrarily complex limits.
.LI
Diacriticals: dots, double dots, hats, bars, etc.
.LI
Easily learned by non-programmers and mathematical typists.
.LI
.LE 1
Formulae can appear within tables to be formatted by \s-2TBL\s+2 (see below).
.Li NEQN [f,m]
A mathematical preprocessor for \s-2NROFF\s+2
with the same facilities as \s-2EQN\s+2,
except for the limitations imposed by the graphic capabilities of the terminal being used.
Prepares formulae for display on
various Diablo-mechanism terminals, etc.
.Li \fB\-\fPMM [m,t]
A standardized manuscript layout
for use with \s-2NROFF/TROFF\s+2.
Provides a flexible, user-oriented
interface to these two formatters;
designed to be:
.BL "" 1
.LI
Robust in face of user errors.
.LI
Easy to use by all levels of users.
.LI
Adaptable to a wide range of
output styles.
.LI
Can be extended by users familiar with
the formatter.
.LI
Compatible with both \s-2NROFF\s+2 and \s-2TROFF\s+2.
.LE 1
.P
Some of its features are:
.BL "" 1
.LI
Page numbers and draft dates.
.LI
Cover sheets and title pages.
.LI
Automatically-numbered or \*`lettered\*' headings.
.LI
Automatically-numbered or \*`lettered\*' lists.
.LI
Automatically-numbered figure and table captions.
.LI
Automatically-numbered and positioned footnotes.
.LI
Single- or double-column text.
.LI
Paragraphing, displays, and indentation.
.LI
Automatic table of contents.
.LE 1
.Li TBL [f,m]
A preprocessor for \s-2NROFF\s+2
that translates simple descriptions of table layouts
and contents into detailed formatting instructions:
.BL "" 1
.LI
Computes appropriate column widths.
.LI
Handles left- and right-justified columns,
centered columns, and decimal-point
aligned columns.
.LI
Places column titles;
spans these titles, as appropriate.
.LE 1
For example:
.sp 2p
.DS
.TS
center doublebox;
cfB s s s.
Composition of Foods
_
.T&
cfI || cfI s s
c || c s s
c || c | c | c.
Food	Percent by Weight
\^	_
\^	Protein	Fat	Carbo-
\^	\^	\^	hydrate
=
.T&
l || n | n | n.
Apples	.4	.5	13.0
Halibut	18.4	5.2	\fB.\^.\^.\fP
Lima beans	7.5	.8	22.0
Milk	3.3	4.0	5.0
Mushrooms	3.5	.4	6.0
Rye bread	9.0	.6	52.7
.TE
.DE
.sp 2p
.LE 1
.H 3 "Other\|~Text\|~Processing\|~Tools"
.VL 18 1
.Li SPELL
Finds spelling errors by looking up all uncommon words from a document
in a large spelling list.
Knows about prefixes and suffixes and can cope with such rotten spellings
as \*`roted.\*'
.Li TYPO
Finds typographical errors.
Statistically analyzes all the words in a text, weeds out
several thousand familiar ones, and prints the rest sorted so that
the most improbably spelled ones
tend to come to the top of the list.
.Li PTX
Generates a permuted index, like the one in the \*(p2 User's Manual.
.Li GRAPH [f]
Given the coordinates of the points to be plotted, draws the
corresponding graph; has many options for scaling, axes, grids, labeling, etc.
.Li PLOT [f]
Makes the output of \s-2GRAPH\s+2 suitable
for plotting on a Diablo-mechanism terminal.
.Li "300, 450" [f]
Exploits the hardware facilities of
\s-2GSI\s+2300, \s-2DASI\s+2450, and other Diablo-mechanism terminals:
.BL "" 1
.LI
Implements reverse line-feeds and forward and reverse fractional-line motions.
.LI
Allows any combination of 10- or 12-pitch printing with 6 or 8 lines/inch
spacing.
.LI
Approximates Greek letters and other special characters
by overstriking in plot mode.
.LE 1
.Li HP [f]
Like \s-2GSI\s+2, but for the Hewlett-Packard 2640 family of terminals.
.Li COL [f]
Reformats files with reverse line-feeds
so that they can be correctly printed
on terminals that cannot reverse line-feed.
.LE 1
.H 2 "SYSTEM\|~ADMINISTRATION"
.H 3 "Operations,\|~Maintenance,\|~Backup,\|~and\|~Accounting"
.VL 18 1
.Li CONFIG
This program helps simplify system generation.
See
.I "Setting Up \*(p1."
.Li MOUNT
Attaches a device containing
a file system to
the tree of directories.
Protects against nonsense arrangements.
.Li UMOUNT
Removes the file system contained on a device
from the tree of directories.
Protects against removing a busy device.
.Li MKFS
Makes a new file system on a device.
.Li MKNOD
Makes an i-node (file system entry) for a special file.
Special files are
phys\%ical devices,
virtual devices, physical memory, etc.
.Li VOLCOPY
File system backup/recovery system for disk/disk or disk/tape.
Protective labeling of disks and
tapes is included.
.Li SU
Temporarily allows one to become the super-user with all the rights and privileges
thereof.
Requires a (distinct) password.
.Li FSCK
Used to check the consistency of file systems and directories
and make interractive repairs.
.BL "" 1
.LI
Print statistics:
number of files,
number of directories,
number of special files,
space used,
free space.
.LI
Report duplicate use of space.
.LI
Retrieve lost space.
.LI
Report inaccessible files.
.LI
Check consistency of directories.
.LI
Reorganize free disk space for maximum operating efficiency.
.LE 1
.Li SYNC
Forces all outstanding \s-2I/O\s+2 on the system to completion.
Used to shut down the system gracefully.
.Li CONFIG
Tailors device-dependent system code to a specific hardware configuration.
As distributed, \*(p1 can
be brought up directly on any acceptable \s-2CPU\s+2
with an acceptable tape drive and disk, sufficient amount of main memory,
a console terminal,
and either clock.
.Li ACCT\(** [m]
The accounting package covers connect time accounting, command usage, command
frequency, disk use, etc.
All of these can be summarized by user, by day, etc.
.Li "Error\|~Logging" [m]
\*(p2 supports \*d-style hardware error detection and reporting.
.Li ETP [m]
The Equipment Test Package is a useful addition to \*d diagnostic software.
It is essentially a \*(p1-based system exerciser/verifier.
.Li Operations
A number of commands and several manuals (see Section~8 below)
are provided for the operations staff.
.LE 1
.H 2 "DEMONSTRATION\|~AND\|~TRAINING\|~PROGRAMS"
Unless otherwise indicated below,
source code for the following interactive programs is
.I not
included:
.VL 18 1
.Li QUIZ
Tests your knowledge of Shakespeare, presidents, capitals, etc.
Source code included.
.Li CHESS
This chess-playing program scored
1-2-1 and 3-0-1 in the 1973 and 1974 \s-2ACM\s+2 Computer Chess
Championships.
.Li BJ
A blackjack dealer.
.Li REVERSI
A game of dramatic reversals.
.Li MOO
A fascinating number-guessing game, rather like Mastermind\(rg.
.Li FACTOR
Computes prime factors of a number.
.Li CAL
Prints a calendar of specified month or year between A.D. 1 and 9999.
Source code included.
.Li UNITS
Converts quantities between different scales of measurement.
Knows hundreds of units;
for example, how many kilometers/second (or furlongs/fortnight) is a parsec/megayear?
Source code included.
.Li TTT
A (traditional, 3\*x3, two-dimensional) tic-tac-toe program that learns.
It never makes the same mistake twice,
unless you make it forget what it has learned.
.Li CUBIC
An accomplished player of 4\*x4\*x4 tic-tac-toe.
.Li WUMP
Thrilling hunt for the mighty wumpus in a dangerous cave.
.LE 1
.H 2 "UNIX/TS\|~USER'S\|~MANUAL"
.VL 18 1
.Li MAN
Prints one or more specified \*(p2 User's Manual entries on your terminal.
Machine-readable and hard-copy versions of
that manual are provided:
.BL "" 1
.LI
System overview.
.LI
All commands.
.LI
All system calls.
.LI
Most subroutines in the assembler, \*C, and \s-2FORTRAN\s+2 libraries.
.LI
All devices and other special files.
.LI
File formats for all
files known to the system software.
.LI
Descriptions of various terminals commonly used with \*(p1.
.LI
\*`Boot\*' procedures.
.LE 1
.LE 1
.bp
.H 2 "DOCUMENTS\|~FOR\|~UNIX/TS"
.nr Hu 4
In addition to the \*(p2 User's Manual\(emEdition~1.0, which is a separate
volume (see Section~7 above), the following are provided with \*(p1:
.HU "General:"
.br
.ns
.AL 1 "" 1
.LI
\*(p2\*_Overview and Synopsis of Facilities (this document).
.LI
The \*(u2 Time-Sharing System (reprinted from \fIComm. \s-2ACM\s0\fP \fB17\fP(7):365-75, July 1974).
.LI
The \*(u2 Time-sharing System\*_A Retrospective.
.LI
BSTJ    ????
.LE 1
.HU "Basic\|~User\|~Information:"
.br
.ns
.AL 1 "" 1
.LI
\*(p2 Documentation Roadmap.
.LI
\*(p2 Beginner's Course.
.LI
A Tutorial Introduction to the \*(u2 Text Editor.
.LI
Advanced Editing on \*(u2.
.LI
\*(p2 Shell Tutorial.
.LI
\*(u2 for Beginners.
.LI
\*(u2 Programming.
.LI
\*C Reference Manual.
.LI
Programming in \*C\*_A Tutorial.
.LI
A New Input-Output Package.
ADB Tutorial.
.LI
AWK Tutorial.
.LE 1
.HU "Text\|~Processing,\|~Formatting,\|~and\|~Typesetting:"
.br
.ns
.AL 1 "" 1
.LI
N\s-2ROFF/TROFF\s+2 User's Manual.
.LI
P\s-2WB/MM\s+2\*_Programmer's Workbench Memorandum Macros.
.LI
Typing Documents with P\s-2WB/MM\s+2.
.LI
P\s-2WB/MM\s+2 Tutorial.
.LI
Tbl\*_A Program to Format Tables.
.LI
A T\s-2ROFF\s+2 Tutorial.
.LI
Typesetting Mathematics\*_User's Guide (Second Edition).
.LI
New Graphic Symbols for E\s-2QN\s+2 and N\s-2EQN\s+2.
.LE 1
.HU "Additional\|~Facilities:"
.br
.ns
.AL 1 "" 1
.LI
B\s-2C\s+2\*_An Arbitrary Precision Desk Calculator Language.
.LI
D\s-2C\s+2\*_An Interactive Desk Calculator.
.LI
Y\s-2ACC\s+2\*_Yet Another Compiler Compiler.
.LI
L\s-2EX\s+2\*_Lexical Analyzer Generator.
.LI
R\s-2ATFOR\s+2\*_A Preprocessor for a Rational \s-2FORTRAN\s+2.
.LI
The M4 Macro Processor.
.LI
Make\*_A Program for Maintaining Computer Programs.
.LE 1
.HU "Internals,\|~Operations,\|~and\|~Administration:"
.br
.ns
.AL 1 "" 1
.LI
Setting up \*(p2.
.LI
Administrative Advice for \*(p2.
.LI
\*(p2 Accounting.
.LI
FSCK Tutorial.
.LI
\*(p2 Error Logging
.LI
The \*(u2 I/O System.
.LI
On the Security of \*(u2.
.LI
\*(u2 Assembler Reference Manual.
.LI
\*(p2 Manual Page Macros.
.LE 1
.TC 2 1 2 0 "\fBP\s-2WB/UNIX\s+2\fP" "\fBOverview\| and\| Synopsis\| of\| Facilities\fP"