For this assignment, you are to modify your existing default UIC web page. You will need to have an icarus account and be familiar with a few UNIX commands:
Icarus is UIC's Unix machine. Every student can have an account on the icarus machine. Your icarus account name and password is the same as your netid and password. To create an icarus account, goto the the Create an ACCC Account web page.
You should log onto icarus using SSH which stands for Secure SHell. The ACCC has some web page support for SSH. An alternative program to SSH is PuTTY. The added security of these programs is a level of encryption that the traditional telnet program lacks.
Once you are logged into icarus, you will need to learn some basic UNIX commands to get around and perform various tasks. Again, the ACCC has some web page support for using icarus. In particular the ACCC's web page UNIX 101 give a nice summary on various UNIX commands.
End your connection to UNIX. It is very important to disconnect when you are finished so no one else can come along after you and use your account.
List the contents of the current directory. Note: a UNIX directory is the same as a Windows folder.
The ls command has a special usage that will give more information about the files in the current directory. This is the long listing. This uses the -l option to the ls command:
ls -lThe first thing given on the long listing is the permissions for each file. This is important when making web pages viewable on the internet.
Allows the contents of file in <filename> to be changed. The editor pico is the counter part to the email reader pine. The ACCC's web page combine these two programs together under the name of pine. For a web page with a description of pico and how to use it, check out the North Carolina State Pico Page or ther University of South Dakota Pico Page.
Change to the directory given in <directoryName>. This command is normally used to change to a sub-directory of the current directory (change one level down in the hierarchical file system).
The cd command has two special usages. These are:
By just typing in cd, you will change back to your Home directory from where ever you are at in the hierarchical file system. Your Home directory is the directory you are in when you first log onto the UNIX system.
This command will move you up one level in the hierarchical file system. The directory that is one level up from the current directory is referred to as the parent directory of the current directory.
Display the contents of the file indicated by <filename> to the screen.
Display the contents of the file indicated by <filename> to the screen one page at a time.
Creates a duplicate of the file in <filename1> with the name <filename2>.
Renames the file in <filename1> with the name <filename2>.
Deletes the file in <filename> from the current directory. Note: once a file is deleted is cannot be restored. So use this command with caution!
Sends the file in <filename> to be printed at the printer with name <printerName>. This command also has a ACCC web page describing its use. Note: The lpr command will assume the file is stored using the ASCII character format (i.e. plain text). So don't try to print files that are not plain text.
The actual command stands for Present Working Directory. This command will list the full path name of the current directory. Each slash in the full path name represents one level in the hierarchical file system.
List the contents of the current directory. Note: a UNIX directory is the same as a Windows folder.
This command will create a new directory with the name indicated by <directoryName> as a sub-directory of the current directory.
This command will remove/erase the directory with the name indicated by <directoryName> that is an existing sub-directory of the current directory. Note, the sub-directory must be empty (contain no files or other directories) before it can be removed.
http://icarus.uic.edu/~NETID or http://www2.uic.edu/~NETID where NETID is your own Net-IDWe have created a link to all of the default homepages for everyone in the class on the CS 100 Student List page.
This home page is stored in the file called index.html in the directory public_html within your Icarus account.
Once you log onto your icarus account, you are in your "home directory". Type the command:
lsto see what files and "sub-directories" are in you home directory. You should have a directory called public_html (if not, it can be created with the make directory command "mkdir"). Now change to that directory by typing the command:
cd public_htmlNow type the ls command to see what is in your public_html directory. The files in this directory are made available to the world by UIC's web server. Your default web page should be in a file called index.html. To change this file (or create it if it doesn't exist) type the command:
pico index.htmlThis will start the pico text editor and will allow you to make changes to this file.
All HTML tags start with an less than symbol, then contain the text that specifies the specific tags and end with a greater than symbol.
The use of this tag will cause the text following the tag to start at the beginning of the next line. The web browser will attempt to display as much information on each as possible no matter what spacing the original HTML file has. The browser just put one space between words removing any extra spaces or new line characters. This makes the use of <br> important.
If the Text File Contains, | The Web Page Displays |
---|---|
Hello There ! How are you ? | Hello There ! How are you ? |
Hello There! <br> How are you? |
Hello There! How are you? |
Hello There! <br> <br> How are you? |
Hello There! How are you? |
Hello There! How are you? | Hello There! How are you? |
Hello There! <br> How are you? |
Hello
There! How are you? |
Hello There! <br> <br> How are you? |
Hello
There! How are you? |
Use the HTML tag of <br> to insert line breaks where needed.
http://icarus.uic.edu/~NETID where NETID is your own Net-IDYou can check this out via the link to your home page on the CS 100 Student List page. Hopefully you will will be able to see an improved home page.
If you cannot view your file, the most likely error is that the permissions are not set correctly for your home directory, your public_html directory or your index.html file. This is were the ls -l command comes into play. The following information is also discussed in the ACCC's Web Publishing for Beginners in the "First Steps" section.
When I am in my public_html directory and enter the ls -l command, the result for my index.html file is:
-rw-r--r-- 1 troy eecs 294 Oct 7 2004 index.htmlThe key part here is the -rw-r--r--. If the last 3 characters do not contain the r, the page won't be displayed. To fix this type in the following command while in your public_html directory.
chmod a+r index.htmlThis command will change the permission to allow the web browsers to read the index.html file in your public_html directory.
There are two other possible places were the permissions could be set wrong. One is at your home directory. The other is with the public_html directory. To fix both of these we need a variation on the chmod command. Entering the following command sequence should solve any problems.
cd
chmod a+x .
chmod a+rx public_html
cd public_html
chmod a+r *