These are the new instructions for exercise three. The instructions have been been tested and revised but I haven't had time to do a final proofread yet. If you find any typographical errors or places in the instructions that are unclear, please send me an e-mail. Mahalo.

Introduction

In this exercise you'll perform a variety of tasks:

  1. You'll connect to UHUNIX;
  2. Make a back-up copy of your ASCII file;
  3. Open your file for editing using Pico;
  4. Insert additional HTML tags;
  5. Close and save your file;
  6. You'll view your work using a Web browser;
  7. Finally, you'll send your instructor an e-mail saying you've completed the exercise.

Step 1: Log onto UHUNIX Using SSH Secure Shell Client

In order to log onto UHUNIX you will first need to establish a connection to your Internet Service Provider, just the way you do when you are going to surf the Web—or use a computer with a networked connection to the Internet.

Using the SSH Secure Shell Client log onto uhunix.hawaii.edu just the way you did in Exercise Two.

Once you've logged onto UHUNIX, change to your public_html directory by using the change directory (cd) command:

cd public_html

Step 2: Make a Back-Up Copy of Your Test-File

Before working on a file it's wise to make a back-up copy. We do that in UNIX using the copy (cp)command.

The basic syntax of the command is:

cp [source file] [destination file]

For [source file] you substitute the name of the file you want to copy.

For [destination file] you substitute the name you wish to give your back-up.

Example:

cp test_file.html test_file_bk1.html

(If you have forgotten the name you gave your file in Exercise Two, use the list files command ls to see the names of files in your directory.)

Now, here's a hint: By using bk1 in the file name it is easily recognized as a back-up copy. Also, since you'll be working on the file again in a later exercise, if you consecutively number your back-ups with bk1, bk2, etc. it's easy to see which file is the latest back-up. Having multiple sequential back-ups also means that if you find you've done something very wrong in a previous session you can always revert to an earlier back-up.

Use the list files command to see that you now have both the original file and a copy:

ls

You should see both your original file and your back-up copy listed.

Step 3: Open Your File with Pico

Now that you've backed up your file let's use Pico to edit it. Pico is a text editor for use in the UNIX environment. Pico reads and produces only ASCII files. That makes it handy for hand-coding Web pages.

The command to open your file and edit it with pico is:

pico [your file name]

Example:

pico test_file.html

Below is what should appear on your screen, although the colors will vary depending on how you've set up your computer (the default is black text on a white background).

Notice that the name of the file you're editing appears at the top of the screen. At the bottom of the screen are the commands available. The upside-down vees preceding the capital letters stand for the Control key. Thus, for example, to search for a character string within the document using the "Where is" command you would hold down the Control key and press W.

We don't need any of these commands just yet.

First, we're going to insert additional material into our document.

Step 4: Insert Additional HTML Tags

When you're working in Pico, your mouse can only be used to highlight text. It cannot be used to move the cursor within the text on the screen in order to add or delete material. To move your cursor you must use your arrow keys.

Use your down-arrow key to move the cursor below the first <HTML> tag. Now add some extra line spaces using your Enter key to give yourself some room.

Below the first <HTML> tag enter a <HEAD> tag.

Hit the Enter key to give yourself a line space below the beginning <HEAD> tag.

This is a paired tag so enter the ending </HEAD> tag. Remember to include the slash.

<html>


<HEAD>

</HEAD>

Aloha, world! This is the test file of [your name].

</html>

Material between the head tags will not appear in the main viewing window of the Web page. This area is used primarily for metadata about your page.

Now beneath the ending </HEAD> tag but above your "Aloha World message" enter your beginning <BODY> tag.

Then move your cursor below your text message and add the ending </BODY> tag.

<html>


<HEAD>

</HEAD>

<BODY>

Aloha, world! This is the test file of [your name].

</BODY>

</html>

The material between these two body tags will appear as the contents of your Web page.

Now use your up-arrow key to move your cursor up between the two head tags. Enter a <TITLE> tag.

Leave an intervening line space, then add the ending </TITLE> tag. Again, remember to include a slash.

<html>

<HEAD>
<TITLE>

</TITLE>
</HEAD>

<BODY>

Aloha, world! This is the test file of [your name].

</BODY>
</html>

Material between the beginning and ending title tags will appear in the colored bar above your Web page.

Now move your cursor between the title tags and enter a descriptive title for your Web page. Some web indexers use the wording in the title field to index Web pages so normally you would try to be as specific as possible.

<html>

<HEAD>
<TITLE>
donna's LIS 670 test file page
</TITLE>
</HEAD>

<BODY>

Aloha, world! This is the test file of [your name].

</BODY>

</html>

Step 5: Close and Save your File

While holding down the Control key press x.

The system will respond by asking you if you would like to save the changes you've made. The choices are yes to save, no to not save, and control c to cancel this command and return to the document.

To save your changes type y.

Now the system will ask what file name to use. The default value is the name you have already given the file. To use that name simply press Enter.

Step 6: View Your File Using a Web Browser

View your edited ASCII file using a web browser such as Firefox or Internet Explorer.

As before, the template of the URL would be:

http://www2.hawaii.edu/~[your UHUNIX userid]/[your file name]

For example, my URL would be:

http://www2.hawaii.edu/~donnab/test_file.html

Your page should look similar to this one at this point:

The text that you inserted between the TITLE tags should appear in the colored bar at the top of the screen, as indicated by the arrow.

If the title does not appear, this may mean that you still have a copy of the previous version of your page stored in your computer cache. To display the edited version, click on the Reload or Refresh button (depending on your browser) to load the new version.

If your title still does not appear, re-open your file for editing using Pico. A common error is to leave off one of the brackets enclosing a tag, or to accidentally enter a wrong-facing bracket.

After fixing any errors you find, save your file. Then return to your browser, click on the Reload or Refresh button to load the fixed version, then view your file.

Step 7: Send Your Instructor an e-mail

When you've completed all the previous steps in the exercise, send me an e-mail letting me know that you've completed Exercise Three. Again, my e-mail address is: donnab@hawaii.edu.

This is the end of the instructions for Exercise Three. Good luck!


Click here to return to the Exercises page.

Click here to return to the Assignments page.