Lab 3

Part I

Log into to complete this assignment.

Begin by creating a directory called ~/lab3a. (Located in your $HOME directory)

Navigate to that directory and utilize the command wget to download the following file.

Check your work by running the command ls -l alice30.txt. You should have the following output. Verify the file size, date and name.

-rw-rw-r-- 1 smorgan smorgan 148545 Apr 1 1995 alice30.txt

Once you have the downloaded file in your lab3 directory, make three copies of it. You should end up with 4 files in your directory (alice30.txt, alice31.txt, alice32.txt, alice33.txt).

We want to compare different compression/archiving strategies. So you will need to do the following:

At this point, you should have 6 files in your directory. Take all those files and tar them together into a tarball called lab3a_files.tar. This new tarball is located inside the lab3a directory. (So now you will have 7 and only 7 files in that directory).

Check your work by running the command tar -tvvf lab3a_files.tar. You should have only 6 files in your tar. It should look like this. Pay attention to the size and name of your files.

Lab3a Example

Part II

For this part of the assignment, you will find some files. Since different machines could have files in different locations, this part will only work if you are logged into to run these commands.

This part of the assignment is a treasure hunt. You will start with one clue and then progress from there. Each clue will have a unique word in it that will be part of the next file that you need to locate.

Before you begin you will need to create a directory (~/lab3b).

You can find the first clue by finding a file on called zambeze.txt. Redirect >> the absolute path of zambeze.txt to a file called ~/lab3b/cmdz.txt. (You might redirect standard error to a different location like the black hole). You should redirect the standard out of all find commands to the same file. Once you find that file, read the file for the clue to the next file. When you are done cmdz.txt will have one line for each file you’ve found.

Check your work! Make sure that cmdz.txt has the right output in it when you are done. Also, make sure to delete any other files you might have created during this project. I.e. if you copied tiger or lion to your home directory, delete them now.


If you mess up and write the wrong line to cmdz.txt, you can look at your history command to find your previous commands and fix what you did wrong. You can also use the up and down arrows to navigate the history of your commands.

To pass off

Make sure that ~/lab3b/cmdz.txt exists. Also make sure that lab3b directory exists in your $HOME directory on scratch. You should be able to run the command grade_lab3 to see if I can find your file correctly. Take a screenshot of successful completion of the autograder.

Run the commands ls -l ~/lab3a and cat ~/lab3b/cmdz.txt and Take a screenshot of the results.

Include the shell prompt and command on all screenshots.

Last Updated 09/04/2019