MCQ about shell pathes

May 7, 2014 • Michael Schliephake

A path describes the location of an object in a file system. What is an “absolute path” to the file “chapter1.html”?
assignment1

  1. The shortest specification how to reach the desired object from the current working directory,
    f.ex. ”../../documents/book/chapter1.html”.
  2. The specification how to reach the desired object from the current working directory on an arbitrary path,
    f.ex. ”../../../bill/documents/book/chapter1.html”.
  3. The specification how to reach the desired object from the root of the filesystem,
    f.ex. “/home/bill/documents/book/chapter1.html”.
  4. The specification how to reach the folder that contains the desired element,
    f.ex. “/home/bill/documents/book/”.

Three of the four given pathes point to the same file. Which path points to another file?

  1. ~/documents/book/chapter1.html
  2. ~/documents/paper/section1/../../book/chapter1.html
  3. ~/documents/paper/section1/../.././book/chapter1.html
  4. ~/documents/paper/section1/../../.book/chapter1.html