.ds F1
.nf
*********************************************************************
*********************************************************************
*********************************************************************



			 INTRODUCTION

			      TO


		X    X  X    X     X    X    X
		X    X  XX   X     X     X  X
		X    X  X X  X     X      XX
		X    X  X  X X     X      XX
		X    X  X   XX     X     X  X
		 XXXX   X    X     X    X    X



		    TRAINING COURSE MP-119
.fi
.sp 2
.in 14
.ll 58
This textbook was written specifically for the UNIX systems operated
by the Department of Defense, and may contain references to features
available only on those systems.
.nf
.sp
.ll 65
.in 0
.ce 3
********************************************************************
********************************************************************
********************************************************************

.fi
.sp 15
.tl '''Mildred M. Ware'
.tl '''Revised'
.tl '''Susan Costello'
.tl '''Thomas Leary'
.tl '''December, 1979'
.ds H1  ~
.ds Hl MP119
.ds Hr Introduction to Unix
.bp
.rs
.sp 10
.ce 1
INTRODUCTION TO UNIX
.sp 5
.nf
	 uu         uu        nn       nn    iii     ttttttttt
	 uu         uu        nnn      nn    iii        ttt
	 uu         uu        nn n     nn    iii        ttt
	 uu         uu        nn  n    nn    iii        ttt
	 uu         uu        nn   n   nn    iii        ttt
	 uu         uu        nn    n  nn    iii        ttt
	 uuuuuuuuuuuuu        nn     nnnn    iii        ttt


				  iiiiiii
				    iii
				    iii
				    iii
				    iii
				    iii
				  iiiiiii
.sp 3
.ti 12
(Gaining access to Unix, inter-user communication,
.ti 12
file manipulation and utility programs)
.sp 2.0i
.tl '''Mildred M. Ware'
.tl '''December, 2 1979'
.bp 1
.af % i
.ds F1 - % -
.ds Fd
.ds H1  ~
.ds Hl MP119
.ds Hr Introduction to UNIX
.I "~~~~~~~~~~~~~~~TABLE OF CONTENTS"

.I "~~~~~~~~~~~~~~~~~~~~Unit~I"


    Preface___________________________________________ i

     A. Introduction to Unit I

       1. What is Unix________________________________ 1
       2. Entering commands___________________________ 1
       3. What's in Unit I____________________________ 2
       4. Objectives for Unit I_______________________ 3

     B. Module I--Gaining access to the system
       Objectives:____________________________________ 4

       1. The terminal________________________________ 5
       2. The keyboard________________________________ 6
       3. Special characters__________________________ 8
       4. Getting started_____________________________ 8
       5. Changing passwords__________________________ 11
       6. Correction characters_______________________ 13
       7. Who command_________________________________ 14
       8. Where command_______________________________ 15
       9. Date command________________________________ 15
      10. Terminal malfunctions_______________________ 17
      11. Module I test_______________________________ 18
      12. Answers to Module I test____________________ 20


    C. Module II--Inter-user communication
       Objectives_____________________________________ 21

       1. Message command_____________________________ 22
	 (a) Reading mail____________________________ 22
	 (b) Seeking help____________________________ 23
	 (c) Using the Message program commands______ 27
	 (d) Deleting messages_______________________ 28
	 (e) Exiting the Message program_____________ 29
       2. Sending messages
	 (a) SNDMSG command__________________________ 33
	 (b) Points of interest______________________ 35
       3. Write command_______________________________ 36
       4. Remind command______________________________ 39
       5. Module II test______________________________ 42
       6. Answers to Module II test___________________ 43
.bp
   D. Module III__File manipulation

      Objectives______________________________________ 44

       1. What is a file?_____________________________ 45
       2. Creating files______________________________ 47
       3. Displaying files
	 (a)Cat command______________________________ 48
	 (b)Pr command_______________________________ 49
       4. Printed output
	 (a)Opr command______________________________ 52
	 (b)Opr as a filter__________________________ 53
       5. Concatenating Files_________________________ 54
       6. Appending information_______________________ 54
       7. Filenames and wild cards____________________ 57
       8. Listing Filenames___________________________ 59
       9. Deleting files______________________________ 62
      10. Comparing files_____________________________ 63
      11. Changing file modes_________________________ 65
      12. Assigning file modes________________________ 67
      13. Determining file privileges_________________ 68
      14. Module III test_____________________________ 70
      15. Answers to Module III test__________________ 71

  E. Module IV__Utility Programs

     Objectives_______________________________________ 72

       1. Searching files_____________________________ 73
       2. Sorting files_______________________________ 76
       3. Segmenting files____________________________ 83
       4. Spell Command_______________________________ 85
       5. Networking__________________________________ 85
       6. Module IV test______________________________ 88
       7. Answers to Module IV test___________________ 89

      Unit I Unix Commands Summary____________________ 90
.br
      Unit I Proficiency Test_________________________ 92
.fi
.bp
.ds F1 - % -
.ds Fd  ~
.ds Fr  ~
.ds H1  ~
.ds Hl MP119
.ds Hr Introduction to UNIX
.PH "~~~~~~~~~~~~~~Preface" 5 2 2 3
.PH "Purpose"
.PP 5
The purpose of this course is to introduce the student to the
Unix system. Topics are presented to assist the student in learning
to use the Unix system to form and format memoranda, documents,
letters, and reports.
.PP 5
The course specifically includes the use of inter-user communication
commands, file manipulation commands, directory manipulation commands,
the Rand editor, the UNIX Text editor, Utility programs, and NROFF.
.PP 5
This course is designed for use specifically on the Unix systems
of the Dept. of Defense, and may reference programs that are not
used on other systems.
.PH "Goal"
.PP 5
The student will understand how to effectively and efficiently use
the Unix system to create, format, edit, and maintain text files.
In effect, he or she will gain a basic competence in using UNIX.
.PH "Self-paced Instruction"
.PP 5
Many differences may be cited regarding self-paced instruction
and conventional instruction (classroom setting); however, the main
difference is that you have complete control over your learning
environment.  You determine your hours of study, the amount of material
to be covered in a single sitting, when another topic should be
introduced, etc..  In other other words, you set the pace of your
instruction.
.PP 5
There are still more goodies; you no longer have to sit through
boring lectures covering things you already know, or try to learn
something new before you have a firm grasp of the last topic discussed.
You will also know exactly what is expected of you because at the
beginning of each lesson will be a list of objectives which specify the
things you should be able to do after completing the lesson.  Also,
practical exercises follow each lesson to let you know just how well
you are doing---no more guessing.
.PH "How the course is organized"
.sp
.PH "Units"
.PP 5
The course is divided into 4 units. Each unit presents a major phase
of instruction, and each is an independent block of instruction with
the exception of unit I, ie. the units do not have to be studied
sequentially.
.sp
.PH "Modules"
.PP 5
A unit is divided into several lessons called modules. Each module
covers one or more unit objectives, and is further divided into sections
covering a specific topic. At the end of each section are exercises to
be performed at the terminal to re-enforce the previously discussed
topic. Be sure to do these exercises as doing them is essential if you
are to learn the material. At the end of each module is a test covering
the objectives for that module. The module tests are self-administered
and self-scored.
.PH "Unit~Proficiency~Test"
.PP 5
This test covers the objectives stated at the beginning of the unit,
and is self-administered; however, it is graded by the instructor. After
completing the test, you should contact the instructor to have your test
graded and to discuss your progress.
.PH "Final Exam"
.PP 5
The final exam will cover material discussed in all 4 units. In a
conventional course, this is a time to be dreaded; however, in a
self-paced course such as this, all anxieties are eliminated.  You
will know exactly what things to review. How? By looking over the
objectives stated at the beginning of each unit.
.PH "Grades"
.PP 5
A grade of P or F will be given.  To receive a P, you must demonstrate
that you have mastered the material presented in the course by achieving
at least a 70 on the final exam.
.PH "Notation"
.PP 5
The following notation is used in forming commands to indicate that the
enclosed word/words (argument) is to be replaced by a value as indicated by
the enclosed word/words.
.sp
.I "~~symbol~~~~~~~~~~~~~~~meaning"
.br
~~~~~~~~[~]~~~~~~~~~~~~~~~Use of this argument is optional---
~~~~~~~~~~~~~~~~~~~~~~~~~~isn't required to form the command.
.br
~~~~~~~~(~)~or~<~>~~~~~~~~Use of this argument or option is
~~~~~~~~~~~~~~~~~~~~~~~~~~required in forming the command.

.PH "~Other~Notation"
.nf
     Type:         You are to type the characters that follow.

     Response      A message displayed by the system.
.fi
.PH "Unix Account"
.PP 5
Do you have an account on the Unix system?  If not, contact the
operations people on your local UNIX system.  You must have an account on
a UNIX system before beginning this course. Also, it is necessary for
you to have this course to effectively use the system.
.PH "References"
.PP 5
There are several information bulletins and manuals on the Unix System
which may be obtained by contacting the systems manager. You should have
received the following items when you obtained your UNIX account:
.br
.L4
Documents for the PWB/UNIX Time Sharing System
.L4
PWB/UNIX User's Manual, Edition 1.0
.L4
UNIX Reference Card
.L4
Supplement to PWB/UNIX Manual
.L4
Information Guide for UNIX
.E4
.sp
.in 11
.ti -11
Notes: (1) You are not expected to sit down and read all this material.
It is the definitive word on UNIX and is intended primarily for purposes
of reference. As you progress you will find that reading some of the manual
pages might help. Also, reading the UNIX documents can help you expand
your knowledge of particular points.
.ti -11
~~~~~~~(2) A warning concerning the UNIX documentation is in order.
The material is extremely concise. This means that it must be read very
slowly and carefully. Things are mentioned only once and in many cases they
are mentioned rather obscurely. It is precisely this feature of the
manuals that makes MP119 so useful to the new user.
.ti -11
~~~~~~~(3) One more point to keep in mind is the fact that the course
cannot serve as a substitute for the UNIX documentation. Once you finish
the course you will not be a UNIX expert. We are unable to cover everything.
Much useful material has been left out. Even with the subjects taught we have
had to skip many items. Naturally, you are encouraged to refer to the
manuals to expand your knowledge of particular points.
.in -11
.PH "Additional Sources" 5 2 2 3
.PP 5
As was mentioned above,
the material which is presented in MP119 is only an overview of the
facilities that are currently available on the UNIX system. For
information concerning the more esoteric and less widely used aspects
of the system, one must consult the various manual sources.
.PP
On the topic of the UNIX Editor, two sources are currently available:
"A Tutorial Introduction to the UNIX Text Editor" and "Advanced Editing
on UNIX." Both are included in
.I "Documents for the PWB/UNIX Time Sharing System"
(sections B.3 and B.4 respectively).
.PP
For additional information on NROFF and the NM macro package consult the
following sources: "NROFF/TROFF User's Manual," "A TROFF Tutorial,"
"MNM-Macros for Formatting Informal Documents" and "User's Guide to the 'NM'
Macros"(PIB-78-006). The NROFF/TROFF items can be found in the
.I Documents.
The first of the macro items mentioned above forms a part of the
.I "PWB/UNIX User's Manual"
(Supplement, section 7, MNM [VII], pp. 1-6).
The "User's Guide" is on line, a copy can be obtained from your UNIX system
administrator. One more item of interest concerning NROFF is the relevant
section in the
.I "PWB/UNIX User's Manual"
(listed alphabetically in section 1 - PWB/UNIX I).
Finally, for more information on the Rand Editor consult the following:
"The CRT Text Editor NED - Introduction and Reference Manual."
.PP
A few comments on the organization of the
.I "PWB/UNIX User's Manual"
would appear to be in order.
The "User's Manual" is divided into the following eight sections:
.L1 15 2 I
Commands and Application Programs
.L1
System Calls
.L1
Subroutines
.L1
Special Files
.L1
File Formats and Conventions
.L1
Games
.L1
Miscellaneous
.L1
System Maintenance
.E1
.sp
Each of these sections consists of a number of entries of several pages
in length. Within each section entries are organized alphabetically
according to entry name, which appears in the upper right-hand corner.
Supplements to the manual are integrated into the proper section.










