Visit our newest sister site!
Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!


TUCoPS :: Unix :: General :: unixcrs.txt

VERY simple unix tutor, to be read by those wanting to set up an account.












		#     # #     #   ###   #     #
		#     # ##    #    #     #   #
		#     # # #   #    #      # #
		#     # #  #  #    #       #
		#     # #   # #    #      # #
		#     # #    ##    #     #   #
		 #####  #     #   ###   #     #
		
	
	









		  ####    ####   #    #  #####    ####   ######
		 #    #  #    #  #    #  #    #  #       #
		 #       #    #  #    #  #    #   ####   #####
		 #       #    #  #    #  #####        #  #
		 #    #  #    #  #    #  #   #   #    #  #
		  ####    ####    ####   #    #   ####   ######





		Developed by Analytical Evaluation Branch, FSAC
		Revision 1.1    21 Mar 1989
		Author:		Dennis G. Rears
		EMail Address:	<drears>
		Phone:		2683









  ####   #    #    ##    #####    #####  ######  #####            ##
 #    #  #    #   #  #   #    #     #    #       #    #          # #
 #       ######  #    #  #    #     #    #####   #    #            #
 #       #    #  ######  #####      #    #       #####             #
 #    #  #    #  #    #  #          #    #       #   #             #
  ####   #    #  #    #  #          #    ######  #    #          #####








    #    #    #   #####  #####    ####
    #    ##   #     #    #    #  #    #
    #    # #  #     #    #    #  #    #
    #    #  # #     #    #####   #    #
    #    #   ##     #    #   #   #    #
    #    #    #     #    #    #   ####








			INTRODUCTION



   This is a 4 hour course that will cover the basic functions of
   your workplace automation account.  The topics we will cover
   include:

		o Logging In
		o Help Numbers
		o Overview of UNIX
		o File System & working with files
		o Wild Characters
		o Pipes
		o Indirection
		o Standard Commands
		o Picatinny Commands
		

   We will not cover Email or text editing.  These are covered in
   different courses.

   










			
			Important Terms





	
	o Terminal - A video display screen with keyboard.  A
        terminal will only work when connected with a remote device.

	o Personal Computer - A small self contained computer.  Most
        PCs have programs that allow it to act as a terminal for 
        communications

	o Host - A minicomputer or mainframe computer.  The name of
        the host is typically in the prompt (i.e. cor1> ).

        o Workplace Automation Account - commonly called an "email"
        account.  An account on a computer host.

	o GANDALF - a device that connects a terminal to the SYTEK
        network.

	o SYTEK - A network that connects GANDALFS, terminals, or PCs
	to Workplace Automation Hosts and other Picatinny Computers.

	o PICAnet - A network that allows host to host
        communications.  EMAIL is transported across the PICAnet.

	o UNIX - The operating system in use on ARDEC workplace
        automation machines.








			Logging In






		 PC`s - Regardless of PC type (WYSE, Apple, or
		 Zenith) a communication program must be called.
		 This program can be xtalk, kermit, versaterm, or
		 others.  Once this is done you can connect with the
		 Sytek network.


		 GANDALF - Turn the box on and connect to class 100.


		 SYTEK  - Call the proper location for you host.


		 Zenith with NAC - Issue the command sycall uaXXXX
                 where XXXX is the location of the host.

		 LOGIN:  At the login prompt type in your login
     		 name in lower case letters.   When the passwd
		 prompt comes up, type in your password.









			SYTEK Locations





	o c280 -  cc1

	o c400 -  cor1

	o c440 -  cor2

	o c480 -  cor3

	o c580 -  qa1

        o c800 -  ac4

	o ca00 -  aed











			Help


		o  FSAC, BATD 
	
			o 2474
			o email <wal>

		o  CCAC

			o 3668
			o email <wac>

		o  PAD

			o 2316, 5640 (email works better>
			o email <help>

		o  All Others

			o UNIX (8649)
			o email <wad>

		o  Help email addresses

			o action - system administrators
			o msdos  - PC help
			o forum  - computer help
			o sun    - sun computers







 #####                                                           #####
#     #  #    #    ##    #####    #####  ######  #####          #     #
#        #    #   #  #   #    #     #    #       #    #               #
#        ######  #    #  #    #     #    #####   #    #          #####
#        #    #  ######  #####      #    #       #####          #
#     #  #    #  #    #  #          #    #       #   #          #
 #####   #    #  #    #  #          #    ######  #    #         #######










######
#     #    ##     ####      #     ####
#     #   #  #   #          #    #    #
######   #    #   ####      #    #
#     #  ######       #     #    #
#     #  #    #  #    #     #    #    #
######   #    #   ####      #     ####

 #####
#     #   ####   #    #   ####   ######  #####    #####   ####
#        #    #  ##   #  #    #  #       #    #     #    #
#        #    #  # #  #  #       #####   #    #     #     ####
#        #    #  #  # #  #       #       #####      #         #
#     #  #    #  #   ##  #    #  #       #          #    #    #
 #####    ####   #    #   ####   ######  #          #     ####






			Introduction






	   When you are finally logged into your account you are given a
	system or UNIX prompt.  This can be changed by you at a later time.
	The standard prompt is:

		o  machine>

	where machine is the host that you are logged onto.  At this
	point you can type any UNIX command.


	   If you are logging in for the first time you might have to
	choose a passwd.  The password should contain at least six
	characters and at least one non-alpha character.

	   You should change your password frequently.  To change your
	password, type "passwd".  The passwd command will ask you for
	your old password and then for your new password.  It will then
	ask you to verify your password.  Never tell anyone what your
	password is, not even your system administrator.  If you suspect
	your password or account has been comprimised contact your
	system administrator ASAP.






			Typing Mistakes





   	   Most people make a lot of typing mistakes.  UNIX allows you
   	to fix them in three differt ways.


	   Backspace  - This is typically the "Backspace Key".  This
	   will correct your last character.  Control H (^H) also acts
	   as a backspace character.

	   Word Erase -  This character is the Control W (^W).  This
	   will erase the word you typed.  The definition of a word
	   includes puncutation.

	   Kill Line -   This character is the Control U (^U).  On some
	   systems it is the "@" character.  This will erase the whole
	   line.
	   

	   







			Job Interruptions





   	   UNIX allows you to temporarily stop execution of a 
	program or to kill it completely.


		o Control S (^S) - Will stop input/output of
		characters.  Anything typed after these keys are hit
		are saved and will go to the computer when resumed.

		o Control Q (^Q) - Will resume input/output.

	   These will work on any terminal but might not work with
	Personal Computers.


		o Control C (^C) - Will kill most programs.  Some
	programs (msg, vi, gemacs) will not allow themselves to be
 	killed.








			Logging Off





   	   Always log off when you are done.  Never leave the
	terminal when you have an open login session.  There are many 
	ways in which to log off:


		o Control D (^D) - On most systems this will log 
		you off the system. On some it will not.

		o exit 

		o logoff










			 Man Pages





   	   UNIX has help pages for you.  They can be accessed
	through the man command.  This command will print out
	topics of the UNIX manual.  All information is divided into 
        several sections:

		o Commands
		o System Calls (Programmers)
		o Library Calls (Programmers)
		o Special Files (Sys admins)
		o File Formats
		o Games
		o Maintenance Commands

	   Use the man command like:

		man section topic

	 where section refers to a number between 1 to 8, and topic
	 is a name.  Example:  

		man cat

	    will display to your terminal the man pages for the cat
	command.


		man 2 exec

	    will display the "exec" topic of section 2 (System
            Calls) of the manual.	








 #####                                                           #####
#     #  #    #    ##    #####    #####  ######  #####          #     #
#        #    #   #  #   #    #     #    #       #    #               #
#        ######  #    #  #    #     #    #####   #    #          #####
#        #    #  ######  #####      #    #       #####                #
#     #  #    #  #    #  #          #    #       #   #          #     #
 #####   #    #  #    #  #          #    ######  #    #          #####


#     #
#  #  #   ####   #####   #    #     #    #    #   ####
#  #  #  #    #  #    #  #   #      #    ##   #  #    #
#  #  #  #    #  #    #  ####       #    # #  #  #
#  #  #  #    #  #####   #  #       #    #  # #  #  ###
#  #  #  #    #  #   #   #   #      #    #   ##  #    #
 ## ##    ####   #    #  #    #     #    #    #   ####


 #    #     #     #####  #    #
 #    #     #       #    #    #
 #    #     #       #    ######
 # ## #     #       #    #    #
 ##  ##     #       #    #    #
 #    #     #       #    #    #

#######
#           #    #       ######   ####
#           #    #       #       #
#####       #    #       #####    ####
#           #    #       #            #
#           #    #       #       #    #
#           #    ######  ######   ####









			UNIX & Files



	   UNIX deals a lot with working with files.  This includes
	creating, changing, deleting, and changing the status of 
	different files.  There are many different types of files
	that UNIX has they include:


		o directories -  A directory is a file that contains
		other files.  Every Ordinary file must be associated
		with a directory.

		o ordinary file - A "normal" file.  Examples 
		include mailbox, data, vi, and program files.

		o special file - A special file is connected to
		a physical device like a printer, disk drive, or
		terminal.  All special files normally reside in
		/dev/.








			Basic File Commands










	   There are some basic file commands.  They include:

		o ls
		  ls -a
		  ls dir1

		   The command ls will list all the files in you
		   present working directory.  The "ls -a" will list
		   all files in your pwd including hidden files
		   beginning with ".".  The "ls dir1"  will list all
		   files in the directory dir1.

		o cat file1 file2 file3 ...

		   The cat command will display to the terminal the
		   contents of each file listed.

		o mv file1 file2     or
		  mv file1 file2 ... dir1

		    The mv command will rename a file.  The first
		    example renames file1 to file2.  The second
		    command will put file1 & file2 into a directory
		    called dir1.

		o cp file1 file2
		     file1 dir1

		   The cp command will copy file1 to file2.  In the
		   second example it will copy file1 to a directory
		   dir1 and give it the name of file1.









			Basic File Commands










	   As stated before UNIX has a tree like directory structure. 
	A example of a stucture is this:


				/

   .
	       	-------------------------------------------------
        	bin/	dev/ 	/u1	/usr	filea fileb	/tmp   
	      -------  ------   ----    ---------		----
		files	files	files	bin/ filea
					----
					files


	   The pwd command will tell you what directory your are in.
	Enter pwd at the UNIX prompt.

	
		  










			Changing Directories










		o  cd -  will change your directory to your "home"
			 directory.

		o  cd /  - will put you into the root directory of
		the system.

		o  cd dirname - will cd to dirname.

		o  cd .. - will bring you up a level.

	If you are in the directory /u1/guest/pyram01 what will
	happen when you:


		o cd
		o cd ../pyram03
		o cd /dev
		o cd









			ls Command









		o  ls -1 

			is the long option which will give you:

	-rw-r--r--  1 drears        322 Apr 27 09:17 3.5

		o -|---|---|---
		  T  O   G   W

			o T indicates the type of file.  There are
			five types:

				o d - directory
				o - - ordinary file
				o c - character special file
				o b - block special file
				o l - symbolic link

			o O - indicates Owner Permissions
			o G - indicates Group Permissions
			o W - indicates World Permissions

		o  rwx

			o read permission
			o write permission
			o execute permission

			you need read & execute permission to
			read a file in a directory and then only if
			you have read permission of the file.










			Files & Directories









	   If you change the name of a file you are actually
	changing as directory entry, not the file itself.  You can 
	change permissions of  file by using the chmod command.


		chmod XXX file1 file2 ...

	   This will change the permissions of file1 and file2 to
	XXX.  The first X refers to the Owner, the second Group, and
	the third the world.

		1	Execute
		2	Write
		4	Read
		-


	Examples:

	chmod 700 file - The owner has read, write, execute
	permission, No one else has anything.

	chmod 740 - The owner has all, group has read, world has none.

	chmod 551 - The owner has read/execute, group has read/execute,
	world has execute.

	chmod 007 - people who do not own the file or are in not
	in the group have all permissions, owner & group can't do
	anything.











			Making & Deleting Files/Directories









	o mkdir dir1 dir2 ....

		will make those directories.

	o rmdir dir1 dir2 ..

		will remove those directories provided they are
	empty.

	o rm file1 file2

		will remove file1 & file2.

	o rm -i file1 file2 

		will remove the files but ask for conformation for
	each one.

	o rm -f file1 file

		will remove file without question if permissions 
        are right.

	o rm -r file1 dir1 

		will remove file1 and dir1 and all contents of dir1.












			Special (meta) Characters









	o ?  - will match any character.  rm a??? will remove any
	file beginning with "a" and containing 4 characters.

	o [] - will match any character in the brackets. rm [qwe]
	will delete any file that that has a name of q w or e.

	o *  - matches any string in the filename:

		rm * 	removes all files in the directory.
		rm q*	removes all files beginning with q.
		rm a*t	removes all files beginning with a
			and ending with t.

	o  What will these do:

		o ls [1-4]*

		o ls a?*ty[2]

		o rm t*
		
		o rm t *









 #####                                                          #
#     #  #    #    ##    #####    #####  ######  #####          #    #
#        #    #   #  #   #    #     #    #       #    #         #    #
#        ######  #    #  #    #     #    #####   #    #         #    #
#        #    #  ######  #####      #    #       #####          #######
#     #  #    #  #    #  #          #    #       #   #               #
 #####   #    #  #    #  #          #    ######  #    #              #











#######
   #     #    #  ######
   #     #    #  #
   #     ######  #####
   #     #    #  #
   #     #    #  #
   #     #    #  ######

 #####
#     #  #    #  ######  #       #
#        #    #  #       #       #
 #####   ######  #####   #       #
      #  #    #  #       #       #
#     #  #    #  #       #       #
 #####   #    #  ######  ######  ######










			The Shell











		o  The Shell is the UNIX command interpeter.  It is

		also called the Bourne Shell, shell, sh, or UNIX 

		prompt.  The shell communicates your commands

		directly to the computer.  It actually runs the

		commands that you request.











			stdin, stdout, stderr











		o  The Shell has three "files" open at all time.
		They include:
		
			o stdin - Standard Input, this is where all
			input for commands come from.  This is
			normally the keyboard.
			
			o stdout - Standard Output. This is where
			all output goes.  This is normally the
			terminal.
			
			o stderr - Standard Error, This is where
			error messages resulting from the use of
			commands is output.  This is normally the
			terminal

		o These can be redirected to other files.  Stdout
		can be redirected by using ">" or ">>".


			o > will put the output of a command into a
			file.  This will eaither create a file or
			overwrite a file by that name. Example:

			date > pol












			stdin, stdout, stderr (cont)






		o  >> will append (if the file already exists) or
		   create a new file.  Example 

			who >> wholist
		
		   will list all users currently logged on into the
		   file wholist.

		o  2> redirects standard error.  Example:

			date klfhskjfh 2> err

			will put any errors arising from the command
			into the file err.

		o  <  will have the problem read from standard
		input.  Example:

		wc < .profile

		will invoke the command wc based upon what is in the
		file .profile.
		





               W O R K P L A C E   A U T O M A T I O N   T O O L S

COMMAND     -  EXPLANATION                                        [May 26  1988]
--------------------------------------------------------------------------------
$change      - change terminal (TERM) and printer (PRINTER) definitions
411          - directory assistance program
411change    - modify user's 411 information
P            - print out files to a printer when using a Tab Products terminal
addresses    - lists addresses of key ARDC/AMCCOM/AMC individuals' mailbox ID's
cal          - prints a calendar for a month or a year
cal3         - prints a three month calendar (this month and the next 2 months)
calc         - on-line calculator
calctutor    - tutorial for the 'calc' program
calendar     - calendar, appointment service
cat          - print the contents of a file
cc           - C language compiler
cd           - change working directory
cgs          - Commander's Guidance Statements review program
checkaddr    - checks validity of mail ID's
checkups     - check to see if there are UPS packages waiting for delivery
chmod        - change permissions on a file
cmdract      - generate the Commander's Action Item List
cmdrcal      - generate the Commander's Short- and Long-Range Calendars
cp           - copy files
cs           - clear screen
date         - give current date and time
dc           - desk calculator; Reverse-Polish Notation (RPN)
ed           - basic UNIX line editor
emacs        - UNIX full-screen text editor
extract      - Executive Extract Program (only accessible by certain users)
f77          - FORTRAN 77 compiler
fing         - front-end to 'finger'; knows about other hosts
finger       - user information lookup program
ftp          - file transfer program
gdate        - give Gregorian date (for a Julian date)
gemacs       - Gosling EMACS UNIX full-screen text editor
gothic       - produce large text in Gothic font
grep         - search a file or files for a word, pattern, etc.
grope        - give possible correct spellings to misspelled words
group        - find the names of the people associated with a particular group






               W O R K P L A C E   A U T O M A T I O N   T O O L S

COMMAND     -  EXPLANATION                                        [May 26  1988]
--------------------------------------------------------------------------------
groups       - list the groups that one is a member of
initpr       - initialize NEC or Diablo printer
ivan         - electronically notify Visitor Reception  of incoming visitors
jdate        - give Julian date (for a Gregorian date)
jove         - friendlier EMACS-like UNIX full-screen editor
kermit       - file transfer protocol program
learn        - a computer-aided instruction (CAI) to learn UNIX
leave        - inform the user when it's time to leave
limo-req     - electronically request limosine to/from area airports
listusers    - list all users on the system giving mailbox and organization name
lock         - lock a terminal keyboard
logout       - exit/quit/logout from UNIX
ls           - list names, etc. of files in a directory
lss          - list names, etc. of files in a directory in columnar fashion
m            - check "mailbox" for mail
man          - print reference manual page for selected UNIX command
mesg         - permit or deny messages via the 'write' command
mkdir        - make a directory
modgraph     - downloads settings to Modgraph GX-100 terminal
more         - file perusal filter for viewing on a terminal (similar to 'page')
mprint       - print a mail message with "Message-Id" linesstriped out 
msg          - read, answer, forward, etc. electronic mail messages
mv           - move/rename a file
news         - print posted news items (current events, announcements, etc.)
nroff        - text formatter
page         - file perusal filter for viewing on a terminal (similar to 'more')
passwd       - change the login password
print        - print out files to a printer
pc           - PASCAL compiler
pr           - print files
pwd          - prints the present working directory
qmod         - modify, hold, or delete system line printer (MDQS) jobs
man          - same as "man" but faster since it does not do highlighting
quota        - give disk usage quotas
qpr          - system line printer spooler
qstat        - give status of system line printer (MDQS) jobs
remind       - sets up a formatted file for the 'reminder' program






               W O R K P L A C E   A U T O M A T I O N   T O O L S

COMMAND     -  EXPLANATION                                        [May 26  1988]
--------------------------------------------------------------------------------
remind       - sets up a formatted file for the 'reminder' program
reminder     - reminds users of upcoming events and/or appointments
repair       - program to report ADP hardware problems to get them repaired
rfc          - manages the listing of network Request-For-Comments (RFC's)
rm           - remove a file (see also 'delete')
rmdir        - remove a directory
s2020        - integrated electronic spreadsheet program, 20/20
see          - like 'cat' but displays non-printable characters (/bin/cat -v)
send         - send electronic mail messages
sh           - fork a new shell (prompt indicates depth level, exit with "exit")
sickleave    - give sick leave usage by organization
sp           - spool file(s) to printer on the Sytek LocalNet/20 Cable system
spellproofer - interactive spelling checker/corrector
susp         - a mechanism used to keep track of suspense
sysnd        - send a text file from a PC equipped with a Sytek Network Card
talk         - allows two users to concurrently communicate on split screens
teach-emacs  - tutorial to learn the 'emacs' screen editor
teach-jove   - tutorial to learn the 'jove' screen editor
tools        - lists this list
tree         - draw directory file tree structure
typer        - menu-driven, interactive touch-typing instruction
ups          - send large files to other users via the UNIX Parcel Service
uptime       - current computer system status
vi           - UNIX full-screen visual editor
wb           - view the weekly bulletins
which        - locates which command within a path is the primary
who          - lists all users on the system
whois        - search the Network Information Center (NIC) for info on a user
wmc          - WordMARK COMPOSER word processing program
write        - write, interactively to another user's terminal (to communicate)









			Pipes







	pipes - pipes allow you to redirect the stdard output of one
	command to the input of another command.

	examples:


		ls |more

		cat *|wc

		ls|head

		cat a b c |more
		









####### #     #    #    #       #     #    #    #######   ###   ####### #     #
#       #     #   # #   #       #     #   # #      #       #    #     # ##    #
#       #     #  #   #  #       #     #  #   #     #       #    #     # # #   #
#####   #     # #     # #       #     # #     #    #       #    #     # #  #  #
#        #   #  ####### #       #     # #######    #       #    #     # #   # #
#         # #   #     # #       #     # #     #    #       #    #     # #    ##
#######    #    #     # #######  #####  #     #    #      ###   ####### #     #


1)  What were your goals in taking this course?

----------------------------------------------------------------------


2)  Did you learn anything in this course?  

----------------------------------------------------------------------

3)  What did you think of the course notes?

----------------------------------------------------------------------

----------------------------------------------------------------------

----------------------------------------------------------------------

4)  Did you like the course?

----------------------------------------------------------------------

----------------------------------------------------------------------

5)  What did you think of the instructor?

----------------------------------------------------------------------

----------------------------------------------------------------------





TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2014 AOH