in reply to Re: Portable way to determine if two names refer to the same file?
in thread Portable way to determine if two names refer to the same file?
If the system claims POSIX conformance and testing dev:ino is unreliable, the system is defective:
The st_ino and st_dev fields taken together uniquely identify the file within the system.
Note that st_dev must be unique within a Local Area Network (LAN) in a ``system'' made up of multiple computers' file systems connected by a LAN.
Networked implementations of a POSIX-conforming system must guarantee that all files visible within the file tree (including parts of the tree that may be remotely mounted from other machines on the network) on each individual processor are uniquely identified by the combination of the st_ino and st_dev fields.
— Above quotes from https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html
I would be very surprised if traditional Unix did not provide this guarantee, so I am fairly sure that all current "unix" platforms will meet it. If some container tool causes this to be violated, that tool is defective, end of story. There is a very strong expectation that modern "*nix" means POSIX.
|
|---|