I have learnt from some sources (such as: this), the following things:
- An inode is a data structure that stores relevant information about a file.
- An inode number points to an inode.
- There is a separate inode table which maintains the mapping information of inode number with corresponding inodes.
- On creation of a file, the inode number and filename are assigned to a file.
- When a file is accessed with a filename, internally, the name is first mapped with its inode number and the corresponding inode is accessed.
What I do not understand is mostly the last line. The inode accesses the inode, but the inode is a separate entity apart from the file. And the descriptions given do not say that an inode in any way is associated with the file, just that an inode is a data structure that contains the metadata related with the file. How is the file accessed then? Does the inode invoke the file?