Milestone 0 Review: Mastering the Command Line
Consolidate Your Learning
Purpose
This document provides a comprehensive review of the foundational command-line skills you learned in Milestone 0. Through a series of active learning exercises, you will solidify your ability to navigate your computer and manage files and directories, all from within the terminal.
What You’ll Accomplish
By the end of this review session, you will have:
- Reinforced your knowledge of the essential shell commands for file system interaction.
- Practiced combining commands using pipes and redirection.
- Applied your navigation skills in a practical scenario.
Active Learning and Engagement
For all the exercises and questions in this review document, you are to record your work on a new page in your Microsoft Teams Student Notebook. This will be the official record of your review process.
Exercise 1: Command Matching Challenge
For your specific operating system (macOS/Linux or Windows), write down the single command that performs each of the following actions.
Actions:
- Prints the full path of your current directory.
- Lists the contents of the current directory.
- Changes the current directory to its parent.
- Creates a new directory named
temp. - Creates a new empty file named
report.txt. - Renames the file
report.txttofinal_report.txt. - Moves the file
final_report.txtinto thetempdirectory. - Displays the contents of the
final_report.txtfile. - Deletes the file
final_report.txt. - Deletes the empty directory
temp.
Exercise 3: Peer Instruction
This exercise is for discussion. Find a partner or a small group and choose one of the topics below. Each person should take a turn explaining their topic to the others.
Explain the difference between an absolute path and a relative path.
- Give an example of an absolute path to a common folder on your computer (like
Desktop). - Give an example of a relative path from your home directory to that same folder.
Explain the meaning of the three special directory shortcuts.
~(tilde).(single dot)..(double dot)
Explain the difference between the pipe | operator and the output redirection > operator.
- Give an example of when you would use a pipe.
- Give an example of when you would use redirection.
Review Questions
Answer the following questions in your Microsoft Teams Student Notebook.
What command would you use to see the contents of a directory in a detailed, long format on macOS or Linux?
What is the key difference between the
>and>>redirection operators?If you are in a directory named
/Users/yourname/project/srcand you run the commandcd .., what will your new present working directory be?What is the most important thing to remember before using the
rmordelcommand?
Reflect and Review
Reflect on your journey through Milestone 0. In your Microsoft Teams Student Notebook, answer the following:
- Connect: Before this milestone, what was your comfort level with using a computer without a graphical interface? How has that changed?
- Challenge: What was the most confusing or challenging concept for you in this milestone (e.g., paths, pipes, remembering the commands)?
- Confidence: Describe one task you can now do from the command line that you couldn’t do before.