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.

All assignments, even those that use an autograder, require Canvas submissions

Run the tree command on your lab2a and lab2b directories and take a screenshot of your directory structure. I must see your username, machine name and command in all screenshots.

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. When you are ready to test to see if things are correct, issue the command grade_lab2 while logged into scratch. It will tell you if things are ok or not. Take a screenshot of the successful completion message. I must see your username, machine name and command in all screenshots.

Submit all screenshots in Canvas

Last Updated 12/15/2017