Xref: utzoo comp.unix.questions:12030 comp.unix.xenix:5218 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!mcdchg!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.questions,comp.unix.xenix Subject: Re: How to determine file being redirected to in C Summary: RFS question Message-ID: <7869@chinet.chi.il.us> Date: 5 Mar 89 04:48:33 GMT References: <10@sherpa.UUCP> <169@usource.UUCP> <1111@auspex.UUCP> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Followup-To: comp.unix.questions Distribution: na Organization: Chinet - Public Access Unix Lines: 19 In article <1111@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes: >>Then you compare st_ino and st_dev in both returned structures. If both >>sets match (ie r.st_ino == f.st_ino && r.st_dev == f.st_dev) >>then they must be the same file. (Network fans: is this true >>for remotely-mounted filesystems?) >It's true of the SunOS NFS implementation, and probably on all NFS >implementations derived from it. The AT&T S5R3 RFS implementation looks >as if it attempts to preserve this property, also. Does st_dev become unique for each remote filesystem or does it just get a bit set to indicate that it is remote? If the latter case is true then the test above might falsely indicate that files on two different remote systems were the same file. Hmmm, cpio and tar might get confused also and think the files should be linked - something to consider with the versions that only store the first copy in the archive (GNUtar, PAX, perhaps others). Les Mikesell