Unix I

Tom Kelliher, CS 240

Feb. 6, 2002

Administrivia

Announcements

Assignment

SPIM reading from before.

From Last Time

Immediate instruction format, conditional branches.

Outline

  1. Unix.

  2. Hands-on Unix lab.

Coming Up

SPIM intro lab.

Unix

Common Trip-Ups and Tips

  1. The Delete key doesn't work.
  2. There are suspended jobs.
  3. The path component separator: /, not \.
  4. The arrow keys and other cursor positioning keys.
  5. Those ``funny'' keystroke sequences in emacs.
  6. Toggling between emacs and the shell.
  7. Forgetting your Unix text when you're working.
  8. Ctrl-c, Ctrl-z, Ctrl-d, Ctrl-q/Ctrl-s.

Anatomy of a Command

ls -aCF

ls -a -C -F ~kelliher/pub

ls -l ~

cat /usr/var/Enron/offShoreAccounts
less /usr/var/Enron/offShoreAccounts

w | grep eshmookl

gcc -o homework1 homework1.cc library.cc

./homework1 > homework1.results

rm *

rm -i *

alias rm 'rm -i'

less .cshrc .login

script

Unix Concepts

  1. Your userid and group.
  2. Your home directory.
  3. The filesystem; navigation: ., ..
  4. Relative, absolute pathnames.
  5. Directory commands: cd, mkdir, rmdir, pwd, ls.
  6. Filenames; wildcards, abbreviations. File completion.
  7. File commands: rm, less, cp, mv.
  8. File permissions.
  9. The superuser.
  10. Processes.
  11. Environment and shell variables: PRINTER, PAGER, EDITOR.

    Edit ~/.login and change PRINTER from pclab to black.

  12. The shell.
  13. Getting help: man, online resources, books.
  14. .cshrc, .login, .twmrc, and .xinitrc.

Hands-On Unix Lab

See lab handout.


Thomas P. Kelliher
Tue Feb 5 13:07:12 EST 2002
Tom Kelliher