A long time ago in a Unix environment far, far away, young Jedi padawans who knew only of desktop software were seduced by the dark side of the Force to enter… The Terminal.
Follow the instructions below using all the console commands introduced in Fundamentals, class, or that you find on your own.
- Create a new directory called "galaxy_far_far_away" and enter it.
- Create a directory called "death_star", and make the following files inside of it:
- "darth_vader.txt"
- "princess_leia.txt"
- "storm_trooper.txt"
- In "galaxy_far_far_away", make a directory named "tatooine" and create the following files in it:
- "luke.txt"
- "ben_kenobi.txt"
- Inside of "tatooine" make a directory called "millenium_falcon", and in it create:
- "han_solo.txt"
- "chewbaca.txt"
- Rename "ben_kenobi.txt" to "obi_wan.txt".
- Copy "storm_trooper.txt" from "death_star" to "tatooine".
- Move "luke.txt" and "obi_wan.txt" to the "millenium_falcon".
- Move "millenium_falcon" out of "tatooine" and into "galaxy_far_far_away".
- Move "millenium_falcon" into "death_star".
- Move "princess_leia.txt" into the "millenium_falcon".
- Delete "obi_wan.txt".
- In "galaxy_far_far_away", make a directory called "yavin_4".
- Move the "millenium_falcon" out of the "death_star" and into "yavin_4".
- Make a directory in "yavin_4" called "x_wing".
- Move "princess_leia.txt" to "yavin_4" and "luke.txt" to "x_wing".
- Move the "millenium_falcon" and "x_wing" out of "yavin_4" and into "galaxy_far_far_away".
- In "death_star", create directories for "tie_fighter_1", "tie_fighter_2" and "tie_fighter_3".
- Move "darth_vader.txt" into "tie_fighter_1".
- Make a copy of "storm_trooper.txt" in both "tie_fighter_2" and "tie_fighter_3".
- Move all of the "tie_fighters" out of the "death_star" and into "galaxy_far_far_away".
- Explode "tie_fighters" 2 and 3.
- Touch a file in "x_wing" called "the_force.txt".
- Destroy the "death_star" and anyone inside of it.
- Return "x_wing" and the "millenium_falcon" to "yavin_4".
- Celebrate.
Already feeling comfortable with these commands and want an extra challenge? Try doing the following:
- Try applying one command to multiple files at once.
- Try applying one command to all files in a single directory (where necessery)
- Try applying one command to all files that match a pattern.
- Find and use command line shortcuts.
- Try using a mix of absolute and relative paths.