For this assignment, we will combine a few different tasks.
For example, Prof. Troy creates a directory for each course he has taught. If a course has been taught multiple times, a subdirectory is created for files used during each semester. For example, Prof. Troy's CS100 directory has two subfolders Spring02 and Fall04.
UNIX and Windows have what is called a hierarchical file system. There is one directory/folder at the top-most level and this can have one or more sub-directories/sub-folders at the second level. These sub-directories/sub-folders can also have their own sub-directories/sub-folders which would be at the third level. This continues for however many levels you wish to create. As you change directories/folders, you will normally move up or down one level in the hierarchy.
There are a few directory commands that you will want to know are:
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.
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.
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.
Your icarus account should have a special directory called public_html. The files in this directory will be viewable on the World Wide Web through a browser if the permissions for the files are set correctly. If your icarus account does not already have this directory, you will need to create it. The commands to create this directory and set the proper permissions are given in steps 2 and 3 in the First Steps section of the ACCC's web page Web Publishing for Beginners.
The viewers are the people with accounts on the UNIX system. Even though there are three different viewers, we will treat the viewers of group and others the same. Thus we can divide the viewers in two, the user (or owner) of the file and everyone else.
A simple (and incomplete) description of the types of permissions are given below to show how each permission type is used by the UNIX system. The permission of read on a file allows the file to be viewed. The permission of write on a file allows the file to changed. Thus to edit a file, the file must have both read and write permission. The permission of read on a directory allows the ls command to list the files in that directory. The permission of write on a directory allows a file to be created in that directory. The permission of execute on a directory allows the viewer to change to the directory. Thus you normally want to give yourself read, write and execute permission for any directory you will be working. To view the permissions for a file or directory enter the ls -l command. The permissions will be given in the first column of information of the file listing.
To view a file in your web directory on the web, it needs to have the read permission turned on for all viewers. The chmod command (CHange premission MODe) allows you to change the permissions on a file or directory. The command to set the proper permissions are given in step 5 in the First Steps section of the ACCC's web page Web Publishing for Beginners.
http://icarus.uic.edu/~netid/filename where netid is your net-id and filename is the name of the fileThus the file with the name of temp on the icarus account of troy would be:
http://icarus.uic.edu/~troy/tempThis idea is also discussed in the final sentences of the First Steps section of the ACCC's web page Web Publishing for Beginners.