Chapter 1: Introduction to the Command Line
Activity 1: Navigating the Filesystem and Viewing Files
- Use the
cd
command to navigate to the appropriate folder and useless
to read the relevant information:robin ~ $ cd Lesson1/data robin ~/Lesson1/data $ cd pinaceae/cedrus/deodara/ robin ~/Lesson1/data/pinaceae/cedrus/deodara $ less data.txt
- Use the
cd
command to navigate the appropriate folder and view the file withless
. Use the/
command to search for the phrase "derives from" and read the rest of the sentence to get the answer:robin ~/Lesson1/data/pinaceae/cedrus/deodara $ cd ../../.. robin ~/Lesson1/data $ cd pinaceae/abies/pindrow/ robin ~/Lesson1/data/pinaceae/abies/pindrow $ less data.txt
- Navigate to the right folder and run the
tree
command, which reports the number of directories in it. Each directory is a species:robin ~/Lesson1/data/pinaceae/abies/pindrow $ cd ../../.. robin ~/Lesson1/data $ cd taxaceae/taxus/ robin ~/Lesson1/data/taxaceae/taxus ...