*************************************************************************
*				UNIX					*
*************************************************************************

In addition to 'Windows', the other major operating system is Unix. You 
need to (and in my opinion should have) a basic working knowledge of it.
You can find a short course in the form of a series of files in my 
directory /usr/fsb/phys/hcb1/unixses. To make a copy for yourself type
cp -r /usr/fsb/phys/hcb1/unixses unixses. Below is a glossary of the 
most used Unix commands and other information.

*************************A UNIX GLOSSARY*********************************

pwd			print working directory (if you can't remember where 
			you are in the file system hierarchy)
ls			list the files in your curent directory
ls -l			a 'long' listing of the files in your current directory

mkdir dirname		makes a new directory with name 'dirname'
rmdir dirname		removes the directory with name 'dirname'
cd    dirname		moves into the directory with name 'dirname'
cd			cd on its own takes you back to your home directory
cd  ..			moves up one level in directory hierarchy
			(the .. always means the parent directory to the one
			you presently occupy; a single . refers to the 
			directory yu currently occupy)

cp file1 file2		makes a copy of file1 and calls it file2
mv file1 file2		moves (deletes) file1 to (creates new file) file2
rm file1		removes (deletes) file 1
rm -i file1		asks for confirmation that you want to delete file1

history			lists your last 10 (variable) commands and numbers them.
!!			repeats your last unix command
!23			repeats the command numbered 23
!f90			repeats the last command beginning with a 'f90'.
!!addtext		appends 'addtext' to previous command line
^string1^string2	substitutes 'string2' for 'string1' in previous command

*			this is a wild card which stands for any string of 
			characters (be careful in its use!)
?			a wild card standing for any single character

more file1		displays the file 'file1' a page at a time
less file1		displays the file 'file1' a page at a time

man utilityname		manual pages for the utility 'utilityname' 
			(for further info on any of this list of commands 
			consult the online manual)

|			this allows you to 'pipe' the output of one command 
			to the input of a second command

command > file1		redirects the output of 'command' to 'file1' instead 
			of to standard output (screen)
command >> file1	appends the output of 'command' to 'file1' instead 
			of to standard output (screen)
command < file1		takes the input for 'command' from file1
_______________________________________________________________________________

Other items you should know about:

1. The Unix file hierarchy. Know how to navigate this. Know about PATHS 
(e.g. the full path name of my fortran90 file 'read1.f90' 
is /usr/fsb/phys/hcb1/fortran90/read1.f90)

/		the root directory
~		your home directory
. 		current directory
..		parent directory

2. Permissions. When you perform a long listing of files (ls -l) you will see 
in the first ten character spaces various combinations of 'd,r,w,x,-' 
The first space indicates whether a directory (d) or a file (-).
The remaining 9 spaces are grouped into 3 groups of 3. 
Each group of 3 refers to the user (u) i.e. you, the group (g), and others (o) 
namely anyone.
Within each group permission to read (r), write (w) and execute (x) may be 
granted (rwx) or not (-) in any combination.

chmod  ugo+/-rwx file1	The ugo and rwx may appear in any combination depending 
on which permissions you wish to give to (+) or remove from (-) whomever.

2. ctrl C. This is an important command. Interrupts whatever is currently 
running. It can get you out of trouble at embarrassing moments. 

3. Various other commands you might care to try:

who, who am i, wc, date, cal (try cal 1752 and look at September!), 
grep, sort, 
head, tail,
lp -Pprintername file1		prints file1 to printer 'printername
lpq -Pprinternmame		enquiry, print queue
lprm -Pprintername jobnumber	removes from print queue

Consult the manual pages for details of these and other commands.




