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.
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.
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.
tree lab2b look at what the extracted tar file contains. Let’s make some changes to it:
- Remove the
vtdirectory. (and all entries in it)
- Add a directory called advisor.
- Within that directory add 2 files,
danielle. (Remember extensions aren’t required)
- Within that directory add 2 files,
- Add a file called
djto the web directory. (Remember extensions aren’t required)
- Rename the
- Add the file called
itdirectory. (Remember extensions aren’t required)
chadshould be deleted from the
1410folder in the
itdirectory should be moved to the
csdirectory. (Make sure that the contents of that folder copied as well)
- Joe also sometimes teaches a CS class. Add a symbolic link in the
csdirectory, that points to
itdirectory. Do the same for
curtis. (The new symlink will still be named
- Make sure to test your links using the
lesscommand. The files are empty but if there are no errors then your links are successful.
After running the
tree command - if you used a relative path the links will look like this
- curtis -> ../it/curtis
- joe -> ../it/joe
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.
- curtis -> /home/j/jdoe/lab2b/it/curtis
- joe -> /home/j/jdoe/lab2b/it/joe
To pass off
Make sure your files above can be found in your home directory on
All assignments, even those that use an autograder, require Canvas submissions
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