LMU ☀️ CMSI 186
PROGRAMMING LABORATORY
LAB 1: MOVIE MIXUP Due: 2020-01-23

Learning Outcomes

Students will (1) understand file system organization, (2) understand and use both absolute and relative names for files and folders, and (3) be experienced in using the command line to create, move, rename, copy, and delete files and folders.

Reading

Read my notes on the Command Line.

Activities

moviecamera.png

You’ve heard that data scientists are in demand and would like to practice some skills used by these power users, such as—no kidding—cleaning up bad data. You also like movies, and have found a messed up data set. How perfect! You can use your film knowledge while developing one of the signature talents of power users: the command line.

Initialize a repository

As your job is to fix up some messy data, I’ve provided you the bad data set in a GitHub repository that you will import. At GitHub, select Import Repository. Then:

For Your old repository’s clone URL
Enter https://github.com/rtoal/cmsi-186-lab-1-starter-code
For Your new repository details
Enter the repository name cmsi-186-lab-1.

The import might take a few minutes. When done, clone the repo, change to your working directory, and get ready to work.

Fix things up

Browse the folders and files in the repo and note the problems. Put everything right, using only the command line, and keeping track of the commands you use to fix things up. You may use your computer’s file system browser (File Manager, Explorer, etc.) to observe your activity, but you may not use the browser to create, move, rename, copy, delete, or otherwise modify the file system. Your cleaned data must:

Record the sequence of commands you used to organize the files; you’ll be responsible for listing the commands as part of the required submission for this lab (instructions are below). Don’t worry about efficiency—you should feel free to explore! Include commands such as ls or pwd that helped you to figure out where everything was located.

Finally, you must update the README.md file that you imported. The imported README states that the files are messed up; your fixed up README should be rewritten and state something along the lines of the repository being a set of folders and files for movies that were fixed up as part of a command line exercise.

What to turn in

Online:

On hardcopy or email, answers to the following:

  1. The list of commands you used, starting with git clone, that you used to carry out the required lab activities. Your command list should (1) include a few cd commands and (2) demonstrate that you can use both absolute paths and relative paths.
  2. Assuming the following folder hierarchy, give the commands to carry out the following tasks (these small exercises help to reinforce what you have learned):
              /
              ├── g1
              │   └── m1
              │       ├── a
              │       ├── b
              │       └── c
              └── g2
                  ├── m2
                  └── m3
                      └── d
    
    1. Make the folder m1 current
    2. With m1 as the current folder, list the contents of folder m3 (using relative paths)
    3. With m1 as the current folder, list the contents of folder m3 (using absolute paths)
    4. With m1 as the current folder, copy the file d into g1 (using relative paths)
    5. With m2 as the current folder, delete the file b (using relative paths)
  3. Number of hours spent working on this lab.
  4. (Optional) Feel free to let me know what you liked/disliked about this lab, what you learned, etc.
Lab content design by Mandy Korpusik