Unix Homework

Homework to create a structure of folder (directories) and files in your Unix account on Tempest. You'll also create your first HTML files.

Purpose

Working with folders and files is not hard but it's an essential skill. Students in CS 204 sometimes stumble at the beginning of an assignment, needing help in copying the requisite files and folders, dealing with errors that occur, and setting things up correctly.

I don't mind helping with those steps, but it's more empowering for you to not need help.

Terminology

On Unix systems, the word directory is the standard term, with folder being a more recent synonym. I like the alliteration of "files and folders" but I also like the tradition of "directory". Furthermore, the word "directory" makes commands like "cd" (change directory), "pwd" (print working directory) and the like more clear.

The words are perfect synonyms, though, so don't let this confuse you.

Reference

All the skills for this assignment are covered in the unix reference and the Google Presentation on Unix.

Task

You'll set up some files and folders for your use in this course. There will be some extra files and folders in there, just for the purposes of this assignment.

You'll also create a zip file and submit it for grading.

Structure to Create

In your public_html directory, create some folders for this semester. The following is indented to show structure. Anything ending with a slash is a folder. Files will have a dot in their names. Don't create the enclosing public_html folder; you already have that. Anything else that already exists, say because of in-class instructions or exercises, can also be kept.

public_html/
    cs204/
        unix/
            downloads/
                empty.html
            empty.text

Note that names that end with a slash are the names of folders; the contents of the folders are indented under them. There are no empty folders. The empty.html and empty.text files are empty files.

Structure to Copy

The above are all empty files. In this step, you'll copy some existing stuff from the cs204 course account in the pub directory. Since the directories that you are copying will have stuff in them, you should use a recursive copy, unless you want to copy all the contents one at a time.

  1. Copy the downloads/orig folder to the downloads folder you created above.
  2. Name (or rename) the copied folder to be orig_copy
  3. Copy the readings/template.html folder to your unix folder as page1.html

Note that I haven't given you the exact pathnames here, but the information above is sufficient if you understand it and interpret it correctly. You can use ls to confirm your understanding.

Files to Edit

Using VS Code, edit the page1.html file to contain your name in place of the filler text in the title and h1 elements.

Screenshot

View your webpage in a web browser and make a screenshot that includes the URL and your name in the H1 element. If you don't know how to make a screenshot on your computer, search the web or talk to me or the tutors.

Upload that screenshot to the same folder as the page1.html.

Rename the screenshot file to be screenshot1.png (or whatever file extension is appropriate -- Mac screenshots and Windows both create PNG files so that's probably correct).

Edit the page to show the screenshot. (Yes, this is slightly recursive: the page now displays a screenshot of the prior version. We could iterate this process for fun, but let's not.)

Create a Zip file

You're now done. This step creates the file you will turn in.

  1. Go to the cs204 folder in your public_html directory
  2. Create a tarfile of your unix directory tree. Call it unix.zip:
zip -r unix.zip unix

Checking your Work

Before submitting your zip file, you can use the check-unix-assignment command in the course pub/bin directory. It takes your ziup file as a command line argument:

~cs204/pub/bin/check-unix-assignment your_zipfile_here

Submission

There are two parts to the submission; one is code I can run and process with command-line tools and the other is a submission to Gradescope.

For the first part, use the drop command to submit your zipfile to the course drop folder. That command takes two command line arguments: (1) the name of course, cs304 and the name of the file, unix.zip. It looks like this.

[anderson@tempest ~]$ drop cs204 unix.zip 
Copying unix.zip (from anderson) to /home/cs204/drop/ (uid 7003) 
Successful drop. 

Here's the command, suitable for copy/pasting:

drop cs204 unix.zip

For the second part, copy your zipfile to your laptop, using SCP, and upload it to Gradescope.

Once you've submitted your zipfile, you can delete it. But there's no harm in keeping it, either.

Rubric

Here's the grading rubric for this assignment:

Gradescope

Be sure to submit to gradescope.

Time and Work

Finally, when you have completed the assignment, make sure you fill out the time and work. That link has been updated for Spring 2026. That report is required.