Objectives

Command Line Interface Basics

1. Given a folder structure diagram, a list of ‘cd (path)’ commands and target files, match the paths to the target files.

2. Create, rename, and move folders using unix command line tools.

3. Use grep and | to count matches of a pattern in a sample text file and save result to another file.

4. Find what -c, -r, and -b flags do in grep by reading the manual.

5. Identify the difference in two different files using diff.

6. Open and close nano with and without saving a file.

7. Use ‘curl’ to download a file.

8. Read the variables of $PATH.

9. Explain the difference between .bash_profile and .bashrc.

10. Create a new alias by editing the .bash_profile.

11. Given a list of common scenarios, identify when it is appropriate and safe to use sudo, and when it is a dangerous mistake.

12. Write a shell script that greets a user by their $USER name using echo.

#!/bin/sh
USR = "whoami"
echo "Hello" $USR

13. Use chmod to make a shell script executable.