I don't really understand why in UNIX systems they don't store file names directly in the inodes but use a mapping system .. is this only because the size of the inode is defined and can't be changed so in case of long file names we couldn't store them? Or maybe that's in case we change the file name we don't have to do it one more time in the inode ?
Please tell me if I'm wrong or if there are other explanations . Thanks in advance
inodes do not contain file names, only other file metadata. Unix directories are lists of association structures, each of which contains one filename and one inode number.
What is an inode? Linux® must allocate an index node (inode) for every file and directory in the filesystem. Inodes do not store actual data. Instead, they store the metadata where you can find the storage blocks of each file's data.
By definition, an inode is an index node. It serves as a unique identifier for a specific piece of metadata on a given filesystem. Each piece of metadata describes what we think of as a file. That's right, inodes operate on each filesystem, independent of the others.
You can't use inode to check if a file has been changed. It may or may not change when a file is renamed, or moved. It will typically stay the same unless moved onto another disk ...
Why do not include file name directly in inode, here is the reasons that come to my mind:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With