Sonoma State University
Department of Computer Science
CS-210: Introduction to Unix
Exercise 9: Unix Permissions

Objective

In this exercise you are on a treasure hunt looking for hidden files. The commands pertinent to this assignment include:

  • cd
  • pwd
  • ls
  • find
  • cat
  • chmod

Hint: The directories are hidden and have no read permissions. You'll need to use chmod command to change permissions.

For questions one through four, please download then untar/uncompress the following file in your home directory on Blue:

  • cd ~/cs210_exercises/cs210_exercise_9
  • wget www.robertjamesbruce.com/programming_exercises/cs210/fall_2024/cs210_exercise_9_maze2.tgz
  • tar xzf cs210_exercise_9_maze2.tgz

Question 1:

  • What are the contents of the file named, "treasure1.txt"?
  • List the directory path where "treasure1.txt" was located (example: ~/cs210_exercises/cs210_exercise_9/001/002/003/004/treasure1.txt)
  • What Unix commands did you type in Blue in order to find "treasure1.txt" on Blue?
  • What chmod commands did you type on Blue (if applicable) in order to find "treasure1.txt" on Blue?

Question 2:

  • What are the contents of the file named, "treasure2.txt"?
  • List the directory path where "treasure2.txt" was located (example: ~/cs210_exercises/cs210_exercise_9/001/002/003/004/treasure2.txt)
  • What Unix commands did you type in Blue in order to find "treasure2.txt" on Blue?
  • What chmod commands did you type on Blue (if applicable) in order to find "treasure2.txt" on Blue?

Question 3:

  • What are the contents of the file named, "treasure3.txt"?
  • List the directory path where "treasure3.txt" was located (example: ~/cs210_exercises/cs210_exercise_9/001/002/003/004/treasure3.txt)
  • What Unix commands did you type in Blue in order to find "treasure3.txt" on Blue?
  • What chmod commands did you type on Blue (if applicable) in order to find "treasure3.txt" on Blue?

Question 4:

  • What are the contents of the file named, "treasure4.txt"?
  • List the directory path where "treasure4.txt" was located (example: ~/cs210_exercises/cs210_exercise_9/001/002/003/004/treasure4.txt)
  • What Unix commands did you type in Blue in order to find "treasure4.txt" on Blue?
  • What chmod commands did you type on Blue (if applicable) in order to find "treasure4.txt" on Blue?

Submission Instructions:

Please submit your answers to Canvas for the questions above.

Exercise 9 Rubric

CRITERIA RATINGS POINTS
Question 1: Proficient
0.75 points

Student noted the correct contents from the text file, treasure1.txt. Student listed the full directory path relative to the student's home directory where treasure1.txt was located. Student noted the commands utilized to find treasure1.txt. Student noted the chmod command used to change directory permissions. All commands, if entered on Blue, would work without syntax or logic errors AND would effectively identify the location of treasure1.txt.
Satisfactory
0.5 points

Student noted the correct contents from the text file, treasure1.txt. Student listed the full directory path relative to the student's home directory where treasure1.txt was located. Student noted the commands utilized to find treasure1.txt but commands may not yield correct results if entered on Blue. Student noted the chmod command used to change directory permissions but command(s) may not yield correct results if entered on Blue.
Needs Improvement
0.25 points

Student noted the correct contents from the text file, treasure1.txt.
Below Expectation
0 points

No answer submitted.
0.75 points
Question 2: Proficient
0.75 points

Student noted the correct contents from the text file, treasure2.txt. Student listed the full directory path relative to the student's home directory where treasure2.txt was located. Student noted the commands utilized to find treasure2.txt. Student noted the chmod command used to change directory permissions. All commands, if entered on Blue, would work without syntax or logic errors AND would effectively identify the location of treasure2.txt.
Satisfactory
0.5 points

Student noted the correct contents from the text file, treasure2.txt. Student listed the full directory path relative to the student's home directory where treasure2.txt was located. Student noted the commands utilized to find treasure2.txt but commands may not yield correct results if entered on Blue. Student noted the chmod command used to change directory permissions but command(s) may not yield correct results if entered on Blue.
Needs Improvement
0.25 points

Student noted the correct contents from the text file, treasure2.txt.
Below Expectation
0 points

No answer submitted.
0.75 points
Question 3: Proficient
0.75 points

Student noted the correct contents from the text file, treasure3.txt. Student listed the full directory path relative to the student's home directory where treasure3.txt was located. Student noted the commands utilized to find treasure3.txt. Student noted the chmod command used to change directory permissions. All commands, if entered on Blue, would work without syntax or logic errors AND would effectively identify the location of treasure3.txt.
Satisfactory
0.5 points

Student noted the correct contents from the text file, treasure3.txt. Student listed the full directory path relative to the student's home directory where treasure3.txt was located. Student noted the commands utilized to find treasure3.txt but commands may not yield correct results if entered on Blue. Student noted the chmod command used to change directory permissions but command(s) may not yield correct results if entered on Blue.
Needs Improvement
0.25 points

Student noted the correct contents from the text file, treasure3.txt.
Below Expectation
0 points

No answer submitted.
0.75 points
Question 4: Proficient
0.75 points

Student noted the correct contents from the text file, treasure4.txt. Student listed the full directory path relative to the student's home directory where treasure4.txt was located. Student noted the commands utilized to find treasure4.txt. Student noted the chmod command used to change directory permissions. All commands, if entered on Blue, would work without syntax or logic errors AND would effectively identify the location of treasure4.txt.
Satisfactory
0.5 points

Student noted the correct contents from the text file, treasure4.txt. Student listed the full directory path relative to the student's home directory where treasure4.txt was located. Student noted the commands utilized to find treasure4.txt but commands may not yield correct results if entered on Blue. Student noted the chmod command used to change directory permissions but command(s) may not yield correct results if entered on Blue.
Needs Improvement
0.25 points

Student noted the correct contents from the text file, treasure4.txt.
Below Expectation
0 points

No answer submitted.
0.75 points
Total points: 3