ICS 80W Unix Exercises

For lab the week of 3-7 July 1995

Before you begin, read this entire document.

The goals of this set of exercises are for each team (see 10.) to:

  1. Preparation and Set up

    1. Restore your Netscape environment from floppy disk
    2. Using Netscape, examine the sample home page at URL http://www.ics.uci.edu/~aisi/80W/doc/sample-home.html
    3. Save this document (in source form, not text) to the Macintosh Desktop as sample-home.html
    4. In Netscape, use Open File to view the copy of sample-home.html you just saved.
    5. Use fetch to transfer sample-home.html to Clyde. Be sure that the name of the file you transfer remains sample-home.html, and that you transfer the file to your FetchPlace directory. (A directory on Clyde or on a DOS computer is the same thing that the Macintosh or Windows calls a folder.)
    6. Log in to Clyde

  2. Introduction to Unix Commands:

    1. Orientation: examine your home directory

      The ls (list) command shows you information about files, listing those in your current working directory by default. (If you know DOS, it is similar to the dir command). Try these commands to get a sense of the behavior of ls with some of its options:

             ls
             ls -a
             ls -l
             ls -la
             ls -lt
             ls public_html
             ls FetchPlace
      
    2. Move the sample home page into your personal Web area

      You should see sample-home.html in the last listing above. That file needs to be placed in your public_html directory. This can be done with the command mv (move) which is also used to rename files and directories.

      Use this sequence of commands to gain familiarity with the mv command:

             ls public_html
             ls FetchPlace
             mv FetchPlace/sample-home.html public_html
             ls public_html
             ls FetchPlace
      
    3. Make the new document readable

             publish
      
    4. View the result with Netscape (via your home page bookmark)

      Returning to Netscape, go to your personal Web space. (It should be one of your bookmarks already.) Then, click on the file sample-home.html to see what the sample home page looks like.

    5. More Unix Commands: pwd and cd

      The pwd (print working directory) command prints the name of your current working directory. (It is very important to know where you are!) The cd (change directory) command is used to change your current working directory (like the DOS cd command, and much like clicking on a folder on the Macintosh.)

             pwd
             cd public_html
             pwd
             ls
      
    6. Make a version of the sample home page you can edit

      The cp (copy) command is used to make copies of files. Use it to make a copy of your new file sample-home.html.

             ls
             cp sample-home.html home.html
             ls
      
    7. Edit your copy with pico to customize it

      Now that you have made a copy, you can edit home.html and always have the original to refer to in case you make a mistake. Use pico to replace the text referring to John Doe to make it refer to you, your e-mail address, and your personal Web space. There are more detailed instructions in the file, enclosed in comments: <!-- ... -->.

             pico home.html
      
    8. Make the new document readable

      just as in 3. above.

    9. View the result with Netscape (via your home page bookmark)

      Returning to Netscape, go to your personal Web space. (It should be one of your bookmarks already.) Then, click on the file home.html to see if the changes you intended worked. Compare to the original by going back to your Web space and clicking on sample-home.html.

    10. Mail the result to AISI

      Returning to your telnet session on Clyde, run pine. Send a message to aisi@ics.uci.edu, listing the URLs for the home pages (home.html files) of all the members of your team (including your own.) A team consists of 2-4 people who cite one another. Grading for homework 2 will be two points for sending the correct URLs in the mail message, and one point for each team member who cites your home page (up to a total of four points.)