Utah Tech Logo

IT3300

DevOps virtualization

Lab 3

Part I

Log into scratch.cs.dixie.edu 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] (http://cit.dixie.edu/it/1100/files/grade_lab3a.PNG)

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 scratch.cs.dixie.edu 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 scratch.cs.dixie.edu 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. Ignore any paths that are in the /home.ad directory

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.

Hint

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.

The grading script will be run as you are logged into scratch. The command you will execute will be similar for all of your assignments that have an autograder. Here is a sample of the command you will run: run_grader.py --n 2. The 2 is representative of lab2. (Lab 3 would replace the 2 with a 3). You will see some feedback. You should make sure that all your tests pass and that your score is correctly recorded. Please see your instructor for any help or questi ons on the output.