


Commands in Unix are also commonly refered to 'Utilities'. Although
there are literally hundreds of utilities, there are only a handful of
that you will need to be familiar with to work in the GIS laboratory. Some
of the most commonly used utilities are described below ...
(NOTE: Unix commands are always lowercase.)
The window below shows an example of all the above utilities (except man):

Notice that the prompt (the text preceeding your commands) tells you which machine you are on ( land in the example above) and the name of the user who is currently logged on ( hafb above). The number after the user name is the number of commands you have executed in that command tool.
Assignment
1) Move
to the following directory /auto/utah/elev/dem/
What letter do most of the files in this directory end with ?
How many files in this directory end with .ps
?
What command did you use to find out ?
2) Make sure you are
in the directory /auto/hafb/elev/dem/
Try to remove a file in this directory (don't be scared!).
What happend ?
3) Type in the command
cd ~
What directory are you now in ?
4)
Type in the command man ls
Use the space
bar or Return
key to scroll through the text.
What letters are used to indicate permissions for files ?
Hit q to quit
the man page and get back to your unix prompt.
To recieve credit for Exercise #1, mail answers
to the above questions to gisclass@geog.usu.edu
Make sure to include your name(s).
By including an ampersand (&)
at the end of your command line, you can run programs in the 'background',
meaning that your command tool will
give you another prompt and will still accept commands.
Example:
With an ampersand
Without an ampersand
Note: not
all commands need to be run in the background this way. The only time it
is particularly useful for our purposes is when starting programs that
launch
a window(s). Netscape, ArcView, WordPerfect, and Imagine are good
examples of programs that should be started with an ampersand.
Conversley,
Arc, vi, and most Unix utilities (ls, cd, rm, etc) do not need ampersands.
Killing Unwanted Processes
Many times on the Unix system, you may find that a process (program) has been left running in the background on a machine either by you or another user. If the process was initiated by you, you have the ablility to remove it. Otherwise, you need to contact someone who has the power to remove any user's processes (System Administrator, Instructor, etc.).
1) The command psg can tell you if certain commands are still running,
who owns the process, and the ID number used to eliminate it.
To use the psg command, you need to include a text
string that would appear in the program.
Example:
major{ttilton}23:
psg netscape
UID
PID PPID C
STIME TTY
TIME COMD
ttilton 13440
12511 5 19:43:38
pts/7 5:18
/usr/local/netscape
2) If I am user ttilton, I can eliminate the
process by issuing the following command (using the PID number above).
Example:
major{ttilton}24: zap 13440
13440
killed with SIGTERM
This
process is now removed.
Quitting the System
To quit from your Unix login, pull down the RS/GIS Lab Menu by putting your mouse cursor in the screen background , holding down the right mouse button , and choosing exit ... (the last item on the menu). You will then be prompted to hit exit again to log out.
