Unix Introduction

Tom Kelliher, CS 220

Sept. 10, 1997

Announcements

Distribute Unix account info.

Assignment

E-mail to me by noon tomorrow a list of Unix topics you'd like to discuss Friday.

Accounts

PC Lab

  1. Configuring Exchange --- open the Inbox.

  2. Mail server is post.

  3. Adding a printer --- open Internet Explorer and try to run something.

  4. Running telnet and configuring for vt100 emulation.

Phoenix

  1. Telnet to phoenix (can leave off the .goucher.edu).

  2. When prompted, provide your username and password --- Be very careful, Unix is case sensitive. Use ^u to erase a line.

  3. Changing your password: passwd.

  4. Security in Unix: passwords on accounts, modes on files.

  5. Default file security provided by umask setting in .cshrc .

  6. Change file security with chmod. File, directory permissions.

File Operations in Unix

  1. Where am I? Look at your prompt.

  2. Using cd to navigate.

  3. Seeing what's there with ls. Switches:
    1. -l.

    2. -a.

  4. Deleting files with rm. They're gone for good (or bad).

  5. mkdir and rmdir for directories.

  6. Creating and editing files with emacs, pico, vi.

  7. Printing files with lpr. Where do they come out? Just ASCII for now.

Exercise

Create a file, using the following SAL program for its contents:

               .data
i:             .word
output:        .word
input:         .word
prompt1:       .asciiz "Enter a number: "
prompt2:       .asciiz "\nOutput: "
nl:            .asciiz "\n"

               .text
__start:       move i, 2
               puts prompt1
               get input
               move output, input
while:         blez i, endwhile
               puts prompt1
               get input
               add output, output, input
               sub i, i, 1
               b while
endwhile:      puts prompt2
               put output
               puts nl
               done

  1. How is this SAL program similar to a HLL program? Different?

  2. Can you determine what the program does, just by examining it? ( blez is the instruction branch if less than or equal to zero.)

  3. Type it in, save it, print it, and run it.

  4. Modify it so that it reads five numbers.



Thomas P. Kelliher
Wed Sep 10 08:17:02 EDT 1997
Tom Kelliher