A Summary of Minimal UNIX Commands - Fall '02
Dr. Kris Stewart (stewart@rohan.sdsu.edu)
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 (or lynx)
Try to get into the habit and 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.
The tools we will use are:
- Unix: very powerful operating system
- type logout to quit
- type help unix for some on-line information
- pico simple UNIX editor
- start this tool by typing pico
- once within pico - type ^G for help
- type man pico
from Unix prompt for on-line information
- CAREFULLY READ MESSAGES AT BOTTOM OF YOUR SCREEN
- vi visual editor get help (see next line) before using
- type help vi for on-line information
subtopic vi_summary
is helpful
- type vilearn for detailed introduction
- pine for email - start this tool by typing pine
- once within pine - type ? for help
- for more details, type help pine from Unix prompt
or use the URL with a Web browser
http://www.cac.washington.edu/pine/
Pine Web Info
- CAREFULLY READ MESSAGES AT BOTTOM OF YOUR SCREEN
- lynx text-based browser for accessing the World Wide Web
(very fast and handy to use from line-up at home)
start this tool by typing lynx
- once within lynx - type
? for help
- set bookmarks to help organize information.
- netscape Graphic browser for accessing the World Wide Web.
- type netscape when using Xterms in BA110/113
- SET A BOOKMARK WHEN YOU FIND AN INTERESTING LOCATION
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&
- Open a new xterm window (when in BA113/110)
- 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.
THESE FILES MUST BE DOWNLOADED AS BINARY.
return to CS575 Home Page