This is an old revision of the document!
In this exercise, we will explore moving between directories.
Useful UNIX commands for the exercises below (see unix_commands.pdf for a more complete list):
cd /absolute path to directory.
ls /absolute path to directory.
1. Open a shell or terminal window.
2. Create a new directory called
$ mkdir FortCollins
3. Change into
FortCollins using cd:
$ cd FortCollins
4. Confirm that you are in
FortCollins create a new directory called
$ mkdir Likes
6. Change into
$ cd Likes
7. Create a file called
food.txt that contains a list of your favorite places to eat in Fort Collins:
$ echo favorite place to eat >food.txt $ echo another favorite place to eat >food.txt $ echo another favorite place to eat >food.txt
8. Change into your
9. List the contents of food.txt from your home directory:
$ ls /path to Likes
10. Change into the Likes directory:
$ cd /path to Likes
11. Move up one directory:
$ cd ..
12. Create a new directory called
$ mkdir Dislikes
13. Change into
$ cd Dislikes
14. Create a file called
food.txt that contains at least one of your least favorite places to eat in Fort Collins:
$ echo least favorite place to each >>food.txt
15. In one line change into the
$ cd ../Likes
During the exercise, practice using ctrl+a to go the beginning of a line, ctrl+e to go the end of a line, and ctrl+u to delete text. Examine the contents of the directory you make from both the command line and the Finder GUI.
1. Change into your
home directory and make a new directory called
2. Change into
3. Create two new directories called
4. Change into
5. Using only one command, change into
6. Change into your
7. Using only one command, change into
If you have extra time, get lost in Terminus.