Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 3 (12 points): Answer the following questions about the ‘.’ and ‘..’ dir

ID: 3849294 • Letter: P

Question

Problem 3 (12 points): Answer the following questions about the ‘.’ and ‘..’ directories assuming you are currently in the /a/b/c/d/ directory for each question:

a) What specific directory does ‘..’ refer to (in this case)?

b) What specific directory does ‘.’ refer to (in this case)?

c) If you were to run the command cd ../../xyz , what would be the new current working directory?

d) If you were to run the command cd ./e , what would be the new current working directory?

e) Are the ‘.’ and ‘..’ directories considered to be visible or hidden? Why?

f) What is the difference between the ‘.’ and ‘..’ directories?

Explanation / Answer

a) .. refers to parent directory.  In our case d is the present directory, so .. refers to c directory as it is parent directory to d.

b) . refers to current directory. So it refers to d directory.

c) He is presently in /a/b/c/d/ directory, after running the given command  cd ../../xyz. He will be in /a/b/xyz.

d) /a/b/c/d/e is his new current working directory after running  cd ./e.

e) Hidden

Hidden filesystem objects are not listed by default when using the ls command (which is commonly employed to list the items in a directory). However, they can easily be made to appear by adding the -a option. These directories are by default prsent in every directory that we navigate.

f) . reprsents current directory whereas .. represents parent directory.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote