It surprises me to see find iterate/walk through the complete filesystem when I do a simple
find -inum 12345
Without background info it seems to me that there should be much easier ways for to tell all the files with this specific inode 12345 (which is simply a placeholder here)?
Is there maybe even a better way for this? One that does not require to check through all the directory structure of a filesystem simply to tell which filenames are related to an inode?
update
There is another question addressing the issue Quickly find which file(s) belongs to a specific inode number but with the intent to find a better (faster way).
This question is more directed to knowing why it is such a problem in the first place? Maybe there is a good reason related to permissions etc, which would try to make it intentionally difficult to the users to avoid traversing the directory structure to seek for all filenames to an inode.
Still, it seems quite strange that any filesystem would have such a problem telling all the filenames to an inode (at least to the privileged root
) user
The filesystem I am most interested to have this question answered for (if it matters) is ext4.