Timeline for What is the association of an inode with a file?
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 7, 2017 at 12:04 | comment | added | chepner | You cannot. You are thinking of the directory entry as being the file, but it isn't. Directory entries are just non-unique bits of filesystem metadata that refer to anonymous files/inodes. | |
| Jul 7, 2017 at 5:22 | comment | added | mathmaniage | @Nick, Then, what distinction does there lie between the inode and the file, meaning, how can we separate them from each other(more practically)? | |
| Jul 7, 2017 at 3:54 | comment | added | NickD | The inode is the file in the following sense: if you are given the inode, you know what type of file this is, how big it is, what permission bits it has and where on the disk all its data are stored. IOW, everything about the file is known if you are given the inode, except its name (and as @chepner points out, that may not be unique). What you should work through is what happens when you say cat myfile. Briefly: the string "myfile" is looked up in the current directory and the inumber of the file is obtained. From the inumber, we can get the inode. From that we can get everything else. | |
| Jul 7, 2017 at 3:29 | comment | added | mathmaniage | "the inode is the file"? but, it says that it is a data structure, that contains the metadata of the file. How is the metadata contained within the file? How is the file subdivided to contain such information? | |
| Jul 7, 2017 at 2:18 | history | answered | chepner | CC BY-SA 3.0 |