Warning: Case is important when working with any UNIX-based computing system. Thus the names blabber, Blabber, and BlabbeR are all different when used with UNIX.
In what follows the UNIX system prompt
will be indicated by ">"; it may be something different on the workstation
you are using.
Working with directories and files
Data and programs are stored as files in directories. All files and directories in UNIX have an "owner" and there are permissions associated with each file and directory. If you created a file (for example, by storing the output of a calculation) you are the owner of the file. You control who has permission to read the file and to write on top of it. You may give permission only to yourself to read or write a file, give permission to a select number of other users, or give permission to everyone who can log onto the system.
When you are working in a UNIX window and get lost with regard to the directory you are currently working in, type pwd at the UNIX prompt. The name of the current directory is then listed on the screen. When you want to get to your home directory type cd home at the UNIX prompt.
Some UNIX commands that are useful when working with directories are the following.
>mkdirdirname - create a new directory with the name dirname
>ls - list contents of a directory
>pwd - print the name of the current directory
>cat filename - type the contents of the file named filename on the screen
>cddirname - change to the directory named dirname
>mvfileonefiletwo - move the contents of fileone to filetwo. File names may include directory paths, (e.g. mvhonda /home/wrecks/cars). The command mv -i asks you whether or not to go on before a file is overwritten. Notice that mv can be used to rename files.
>cpfileonefiletwo - copy the contents of fileone into filetwoYou may copy entire directories by using the variation below.
>cp -r dironedirtwo - This copies the entire contents including subdirectories of a directory dirone into another directory dirtwo.
Note the difference between mv and cp:mv moves or renames an existing file while cp creates a new, separate copy of an existing file.
>rmfilename - removes the file called filename from the directory
>rm
-rdirname - removes the entire contents
of the directory dirname
UNIX tutorials
UNIX is much more powerful and much more complex than the discussion above may indicate. While not required for this course, having a good command of UNIX will enhance your job prospects! Good tutorials on UNIX at various levels are available on the World Wide Web. Try
http://vis.sdsc.edu/users/documentation/misc/unix/unix_light/index.html
http://www.cs.mun.ca/unixtut/demo.html
http://www.geek-girl.com/unix.html
A variety of UNIX manuals is available
in the bookstore and Dr. Weakliemoccassionally
offers a course that includes an advanced treatment of UNIX.
Printing
On the CCBL system, at the UNIX prompt type lpb file to print the file named file, where b represents a space.
IMPORTANT: BEFORE PRINTING ANY FILE
CHECK TO DETERMINE ITS LENGTH AND WHETHER OR NOT IT IS APPROPRIATE FOR
PRINTING. Long text files should be examined with the jot or ls
commands to determine if they are printable (and worth printing) before
actually printing them. PostScript files (usually with the extension .ps)
can be examined with the xpsviewer. Type xpsviewerbfilename
at the command prompt to start this. If you try to print the wrong
kind of file, the printer may be tied up for a long time printing one or
two characters to a page, or may "hang". If a file looks like nonsense
when viewed with jot orxpsview, it
is
nonsense and should not be printed.
Changing your password
It is a good idea to change your password frequently. Passwords must consist of 6 or more characters, including at least two alphabetic characters, and at least one non-numeric character. Passwords can be a mix of upper and lower cases, and this is recommended.
To change your password, open a UNIX window and type 'yppasswd' at the system prompt. Respond to the questions that come up. You will be asked to enter the new password twice.