##EXERCISE
- Using
cd
andls
, 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.
- List all of the files in
/bin
that start with the letter 'c - List all of the files in
/bin
that contain the letter 'a' - 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:
- Rename the
surveys_IMPORTANT.csv
file tosurveys_new.csv
. - Create a directory in the
biology
directory callednew
- Then, copy the
surveys_new.csv
file intonew
##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.