There are four students of a Linux system (student1, student2, student3, and stu
ID: 3801833 • Letter: T
Question
There are four students of a Linux system (student1, student2, student3, and student4) carry out the following operations given in the following steps in the given order.
student1 creates a file and names it f1. This file is made accessible to all users for read, write, and execute.
student2 puts a hard link to the file created in Step (1) and calls the file f2.
student3 puts a hard link to the file created in Step (1) and calls the file f3.
student1 deletes f1.
Answer the following questions.
How many i-nodes are created in Step(1)?
How many i-nodes are created in Step(2)?
How many i-nodes are created in Step(3)?
Where are the file names f1, f2, and f3 stored? State the answer for each file name.
Where is the information on protection for the file stored?
Where is the information about the hard links created by users user2 and user3 (Steps (2) and (3)) stored?
After Step (4), is student2 able to access the file f2? Explain.
Assume no further links are created for the file in question. What has to happen after Step (4) before the i-node for the file created in Step (1) is marked as free? Explain.
Explanation / Answer
There are four students of a Linux system (student1, student2, student3, and student4) carry out the following operations given in the following steps in the given order.
student1 creates a file and names it f1. This file is made accessible to all users for read, write, and execute.
student2 puts a hard link to the file created in Step (1) and calls the file f2.
student3 puts a hard link to the file created in Step (1) and calls the file f3.
student1 deletes f1.
Answer the following questions.
How many i-nodes are created in Step(1)? 1
How many i-nodes are created in Step(2)? 1
How many i-nodes are created in Step(3)? 1
Where are the file names f1, f2, and f3 stored? State the answer for each file name.
$ ls -il
total 12
2242107 -rwxrwxrwx 3 aaaaa aaaaa 23 Mar 22 09:16 f1
2242107 -rwxrwxrwx 3 aaaaa aaaaa 23 Mar 22 09:16 f2
2242107 -rwxrwxrwx 3 aaaaa aaaaa 23 Mar 22 09:16 f3
All files have same inode entry.
So all file names are stored under same inode data structure.
Every inode which file system stores helps locate the contents of the directory or file only by its inode number.
Where is the information on protection for the file stored?
Where is the information about the hard links created by users user2 and user3 (Steps (2) and (3)) stored?
inode is a data structure in unix file system which stores about the disk blocks and the owner of the file or directory and the permissions. Each file on unix line file system have inode which manages the storage of that file.
After Step (4), is student2 able to access the file f2? Explain.
Assume no further links are created for the file in question. What has to happen after Step (4) before the i-node for the file created in Step (1) is marked as free? Explain.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.