Review

Last Week

What did we do in our last class?

Special Symbols for Paths

What symbols represent the following directories? →

Special Symbols for Paths

Root

Note About Root

We didn’t explicitly mention this in the last class, but:

Absolute Paths

What’s an absolute path?

Relative Paths

What’s a relative path?

Relative and Absolute

Tell me how to create these directories in my home folder

This should result in:

Relative and Absolute Path Questions

  1. From /Volumes, change to the lab1 directory that was just created
    • In /Volumes: cd ~/myprojects/lab1
  2. From home directory, what’s the relative path to output?
    • In home: myprojects/lab1/output
  3. From home directory, what’s the absolute path to output?
    • In home: /Users/professor/myprojects/lab1/output
  4. From output, what’s the relative path to lab2?
    • In myprojects/lab1/output: ../../lab2

Relative and Absolute Path Questions Continued

  1. From output, what’s the absolute path to lab2?
    • In myprojects/lab1/output: /Users/professor/myprojects/lab2
  2. From lab2, what’s the relative path to output?
    • In lab2: ../lab1/output
  3. From lab2, what’s the absolute path to output?
    • In lab2: /Users/professor/myprojects/lab1/output

Reviewing input/output Commands

Downloading Files

…it specifies the name of the file to save your download to.

Archiving and Compressing Files

Extract and Uncompress

Activity: Drills!

Entering commands flash cards x 3 (use set 2)

We’ll do this together, then try downloading it yourself:

  1. Download drills.py to the home directory
  2. Type python drills.py
  3. When prompted for a number, enter 2
  4. CTRL-C quits

Summary Part 1

(brackets - []’s - denote arguments that you must supply; the brackets are not part of the command, so don’t type them out)

Lab

Review

Activity: Everything We’ve Learned So Far

Entering commands flash cards x 3 (use sets 1 and 2)

We’ll do this together, then try downloading it yourself:

  1. Download drills.py to the home directory
  2. Type python drills.py
  3. When prompted for a number, enter 12
  4. CTRL-C quits

Working With Files