The inode number alone is not enough, you also have to compare the device number from stat, because the inode numbers are unique only within each filesystem.
The dev-inode pair usually identifies the file uniquely, but of course there are some caveats.
In reply to Re: Detecting whether two pathes refer to the same file
by ambrus
in thread Detecting whether two pathes refer to the same file
by rovf
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |