ITPEC FE Morning October 2019 Question 19
Which of the following is an explanation of an absolute path name in a file system?
Explanation
The path from the root directory to the target file — an absolute path lists every directory from the top of the tree, so it means the same file wherever you start.
On Unix an absolute path begins with the root, as in /home/user/docs/report.. A relative path such as docs/report. or ../docs/report. starts from the current directory, so its meaning changes when the current directory changes.
Answer (c)
Why not others:
- •(a) — a path from the current directory is a relative path
- •(b) — the home directory is itself a directory below the root and differs per user, so a path from it still depends on a starting point
- •(d) — the length of a path plays no part in the definition; an absolute path is fixed by where it starts, the root
Key rule: Absolute paths start at the root and are the same from anywhere; relative paths start at the current directory, where . is the current and .. the parent directory.
Software · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.