A Summary of Minimal UNIX Commands when using Xterm Labs

(e.g. BAM 113, BAM 110 or LL200)

Dr. Kris Stewart
Dept. Mathematical and Computer Sciences
San Diego State Univeristy

Remember - the computer is your friend, but it is not too smart and will do EXACTLY what you tell it, not what you meant!

Be wary of "info overload" - set bookmarks with Netscape, Internet Explorer, or Lynx

Try to get into the habit of reading the screen when you first log onto rohan. This gives valuable system information, such as scheduled down times and changes to software.

All commands below are to be typed from the Unix command line.

If you get the message - Terminal Type Unknown You need to type

set term=vt100

right away if this is the terminal type your software is emulating.

If your screen lines start to look "messed up" type

resize

If your backspace key doesn't work - type

stty erase your-favorite-single-key-stroke-here

SDSU's rohan machine is a Sun Sparc Station 10.

Useful Unix commands
(a directory = a folder and Unix is case-sensitive):

xterm -sb&
Open a new xterm window with scrollbar (-sb option), when in BA113/110 or other campus UNIX xterm lab
ls
list contents of current directory
mkdir dir
create a subdirectory named 'dir'
rmdir dir
remove the subdirectory name 'dir' (the subdirectory must be empty first)
cd dir1
change to subdirectory dir1 (contained in current directory)
cd ..
change to 'parent' directory
pwd
print working directory (Where am I?)
head filename
display the first few lines of a file
more filename
display contents of filename, screen by screen
mv file1 file2
move (rename) contents of file1 into file2
cp file1 file2
copy the contents of file1 into file2
rm file
remove (delete) the 'file'
ctrl-u (press Ctrl-key & the letter u at same time)
erase current line
ctrl-c
terminates (kills) current job
ctrl-s
temporarily halts the listing on screen
ctrl-q
continued the halted listing
quota -v
display current file storage used (in Kbytes)
du
gives directory structure and amount of space used
gzip filename
reduces size and replaces by filename.gz
gunzip filename.gz
undoes "gzip" so you can read filename again
tar cf mytar.tar *
(c)reate archive file, mytar.tar, containing everything in current dir and recursively all files in subdirs
tar xf mytar.tar
e(x)tract from the archive (keeps dir structure)
tar tf mytar.tar
(t)est the archive file mytar.tar to see contents
*** man tar *** for all the details.
There are tar utilities that run on Macintosh and PC also.
THIS FILES MUST BE DOWNLOADED AS BINARY.