Utah Tech Logo

IT3300

DevOps virtualization

Lab 2

In this lab, you will experiment with some of the commands that we have learned.

SSH into scratch.cs.dixie.edu to complete this assignment.

Part I

Starting in your home directory, you should create a directory called lab2a. Everything ending in .txt is a file, all others are directories. (I.E. dooku.txt is a file since it ends in .txt and there is nothing under it, vehicles is a directory). The files should be empty.

This directory tree will look as follows:


└── lab2a
    ├── empire
    │   ├── characters
    │   │   ├── bobafett.txt
    │   │   ├── darthmaul.txt
    │   │   ├── dooku.txt
    │   │   ├── emperor.txt
    │   │   └── vader.txt
    │   └── vehicles
    │       ├── atat.txt
    │       ├── at-st.txt
    │       └── destroyer.txt
    ├── planets
    │   ├── alderaan.txt
    │   ├── bespin.txt
    │   ├── endor.txt
    │   ├── hoth.txt
    │   ├── kashyyyk.txt
    │   ├── naboo.txt
    │   └── yavin.txt
    └── rebellion
        ├── characters
        │   ├── han.txt
        │   ├── leia.txt
        │   ├── luke.txt
        │   └── obiwan.txt
        └── droids
            ├── c3p0.txt
            └── r2.txt

NOTE:  c3p0 is spelled with a zero, not an oh.

Part II

In this part, you will take an existing directory tree, make changes to it. Begin by copying the following file to your own machine lab2b.tar. Extract this file inside of Your $HOME directory. Look for the ~ as your current directory. Or run the pwd command to see your absolute path. John Doe’s home directory is /home/j/jdoe. Yours will have your username.

The easiest way to obtain this file is to right click on the above web link and select copy link location. Then in a terminal window type wget followed by the link. wget http://cit.dixie.edu/it/1100/files/lab2b.tar This will directly download the file to your computer via a terminal. A tar file contains multiple files similar to a zip file.

To extract the tar file, type tar -xvvf lab2b.tar and the files/structure will extract into the current directory.

Using tree lab2b look at what the extracted tar file contains. Let’s make some changes to it:

After running the tree command - if you used a relative path the links will look like this

If you used an absolute path the links will look something like this - with the path to Your $HOME directory of course instead of John Doe’s.

To pass off

Make sure your files above can be found in your home directory on scratch.cs.dixie.edu.

The grading script is going to look for a lab2a and lab2b directory in your home directory on scratch.cs.dixie.edu. Make sure that they exist and that they have the content in them that you would like. You can run the grading script as often as you like without penalty.

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 questions on the output.