Skip to content

Latest commit

 

History

History
70 lines (43 loc) · 2.01 KB

Exercises.md

File metadata and controls

70 lines (43 loc) · 2.01 KB

##EXERCISE

  • Using cd and ls, go in to the 'shell-ecology/data' directory and list its contents.
  • How many files, how many directories and how many programs are there?

##EXERCISE

Now, we're going on a file hunt.

  • Move around in the 'hidden' directory and try to find the file 'youfoundit.txt'

##EXERCISE

  • Try finding the 'anotherfile.txt' file without changing directories.

##EXERCISE

  • List the contents of the /bin directory. Do you see anything familiar in there?

##EXERCISE

  • What happens if you do ls survey*csv? How is that different than 'ls surveycsv'
  • Do each of the following using a single ls command without navigating to a different directory.
  1. List all of the files in /bin that start with the letter 'c
  2. List all of the files in /bin that contain the letter 'a'
  3. List all of the files in /bin that end with the letter 'o'

BONUS: List all of the files in '/bin' that contain the letter 'a' or 'c'

##EXERCISE

  • Find the line number in your history for the last exercise (listing files in /bin) and reissue that command.

#EXERCISE

  • Print out the contents of the `~/shell-ecology/data/biology/plots.csv' file. What does this file contain?

  • Without changing directories, (you should still be in shell-ecology), use one short command to print the contents of all of the files in the /home/username/shell-ecology/data/biology directory.

##EXERCISE

  • Search for the species "Reithrodontomy" in the species.csv file

  • Search for that species in all the csv files.

  • Search for all the records of "Reithrodontomys megalotis" in the surveys.csv file.
    Hint: Use the 'species.csv' file to figure out the species code

##EXERCISE

Do the following:

  1. Rename the surveys_IMPORTANT.csv file to surveys_new.csv.
  2. Create a directory in the biology directory called new
  3. Then, copy the surveys_new.csv file into new

##Exercise

Open 'awesome.sh' and add "echo AWESOME!" after the grep command and save the file.

We're going to come back and use this file in just a bit.