posted 7 years ago
Hello
Chapter 9 question from OCP 8 Study Guide by Selikoff/Boyarsky
Assume /kang exists as a symbolic link to the directory /mammal/kangaroo within the file system. Which of the following statements are correct about this code snippet? (Choose all that apply.)
Answer options are:
A. A new directory will always be created.
B. A new directory will be created only if /mammal/kangaroo exists.
C. If the code creates a directory, it will be reachable at /kang/joey.
D. If the code creates a directory, it will be reachable at /mammal/kangaroo/joey.
E. The code does not compile.
F. The code will compile but always throws an exception at runtime.
C and D both marked as correct answer.
Explanation says : If /mammal/kangaroo does exist, then the directory will be created at /mammal/kangaroo/joey, and because the symbolic link would be accessible as /kang/joey, C and D are both correct.
Could you please explain why (in which circumstances) would symbolic link be accessable as /kang/joey?
Thanks in advance