For our final exercise, you will use the commands you’ve learned, as well as critical thinking, logic, and mathematical ability (which are all crucial in programming) to traverse a tree of directories in a treasure hunt.
Download the necessary files by typing the following into your terminal:
cd ~/Downloads
git clone https://github.com/junior-devleague/TreasureHunt.git
Begin by cd
’ing into the “TreasureHunt” directory and reading “rules.txt”.
Basically, each directory will have a riddle or question you must solve. The sub-directories are your possible answers, so when you solve a problem, cd
into the answer (which is the name of the directory). Immediately ls
and read the riddle/question every time you enter a new directory.
Note: Don’t just guess and randomly cd
. There are false, misleading paths that will set you back by taking you deeper down to a dead end if you answer incorrectly.
When you are done with this exercise, show one of your instructors Linus the pirate’s hidden treasure and then move on to the next module, “Basic HTML”.