What it means having same inode number?
Since both directory entries have the same inode number, they point to the same item on the disk (ie the same physical file). Of course, inode numbers, as explained above, are partition-specific. So, duplicating an inode number on a different partition would not work as expected.
What is inode number?
The inode number refers to the physical file, the data stored in a particular location. A file also has a device number, and the combination of its inode number and device number is unique throughout all the file systems in the hierarchical file system.
How to search for a specific inode number?
So you have to search for the inode to find the file being referred to. @Coren For example when a file has multiple hard links, you’ve spotted that the contents are obsolete and want to delete the file, but you’ve only found one of the file’s names and want to delete the others. Just use find / -inum .
Why do all files have the same inode number?
Each file in a filesystem has a unique inode number. Inode numbers are guaranteed to be unique only within a filesystem (i.e., the same inode numbers may be used by different filesystems, which is the reason that hard links may not cross filesystem boundaries). Not the answer you’re looking for?
Which is an example of a root inode?
One example you’ll run into quickly is the root inode on ext2/3/4 file systems, which is 2: on a system with multiple file systems you’ll see many, many duplicate inode numbers (although you need to take the output with a pinch of salt since it will also include hard links).
How to find two files with the same Dev number?
If two directory entries have the same inode and dev number, they refer to the same file (though possibly through two different mounts of a same file system for bind mounts). Some find implementations also have a -samefile predicate that will find files with the same device and inode number.