Schedule
Labs
Assignments
TA office hours
Topic videos
Some course notes
Extra problems
Lecture recordings
a) What is an absolute path name for inode 8?
Answer: /usr/ajr/hello.c
b) If we execute the command mkdir /usr/sally , and the newly created directory is inode 9, what is changed in the table above? Make the changes in place in the table, by striking out any removed information and writing in added information.
Answer: (additions in bold)
inode number | is directory? | contents |
---|---|---|
2 | D | "." 2, ".." 2, "bin" 3, "usr" 4, "vmunix" 5 |
3 | D | "." 3, ".." 2, "sh" 6 |
4 | D | "." 4, ".." 2, "ajr" 7 , "sally" 9 |
5 | unix kernel machine code | |
6 | machine code for sh | |
7 | D | "." 7, ".." 4, "hello.c" 8 |
8 | #include <stdio.h> int main(){print("Hello\n");return(0);} | |
9 | "." 9, ".." 4 |
c) [1 mark] What is another absolute path name for inode 8, different from your part 'a' answer?
There are many possible answers. Here are some:
/usr/ajr/../ajr/hello.c
/usr/ajr/./hello.c
/./usr/ajr/hello.c
//usr/ajr/hello.c
//////////////////////////////usr/ajr/hello.c