1.

What is an absolute pathname?(a) pathname relative to a parent directory(b) pathname relative to the root (/)(c) pathname relative to parent and current directory(d) pathname relative to the current directoryI got this question at a job interview.My query is from Absolute and Relative Pathnames topic in division The File System of Unix

Answer»

Correct option is (b) pathname relative to the root (/)

To elaborate: When a FILE’s pathname is DETERMINED with RESPECT to the root(/), such a pathname is CALLED ABSOLUTE pathname. No two files in a UNIX system can have same absolute pathnames. Two files can be of same name but in different directories hence their pathname would be different from each other. For example, /bin/user06/dir_01is an example of absolute pathname.



Discussion

No Comment Found

Related InterviewSolutions