From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f891f,372ebe42676183e0 X-Google-Attributes: gidf891f,public X-Google-Thread: f8c9b,372ebe42676183e0 X-Google-Attributes: gidf8c9b,public X-Google-Thread: fc89c,372ebe42676183e0 X-Google-Attributes: gidfc89c,public X-Google-Thread: 1012a6,372ebe42676183e0 X-Google-Attributes: gid1012a6,public X-Google-Thread: 103376,372ebe42676183e0 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,372ebe42676183e0 X-Google-Attributes: gid1014db,public X-Google-Thread: f72b0,372ebe42676183e0 X-Google-Attributes: gidf72b0,public X-Google-ArrivalTime: 1994-12-02 20:54:35 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!pipex!uunet!zib-berlin.de!prise.nz.dlr.de!news.dfn.de!zeus.rbi.informatik.uni-frankfurt.de!dionysos.rbi.informatik.uni-frankfurt.de!fp From: fp@dionysos.rbi.informatik.uni-frankfurt.de (Frank Pilhofer) Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.misc,comp.unix.programmer,comp.unix.questions,comp.unix.shell,comp.unix.misc Subject: Re: Filename comparison ... HELP NEEDED! Date: 2 Dec 1994 15:14:12 GMT Organization: J. W. Goethe-Universitaet Frankfurt/Main Message-ID: <3bndk4$pt2@zeus.rbi.informatik.uni-frankfurt.de> References: <3bn13h$jmo@speedy.cci.de> NNTP-Posting-Host: dionysos.rbi.informatik.uni-frankfurt.de Keywords: filenames, C, Ada Xref: bga.com comp.lang.ada:8218 comp.lang.c:33146 comp.lang.misc:4304 comp.unix.programmer:9532 comp.unix.questions:17313 comp.unix.shell:7818 comp.unix.misc:5086 Date: 1994-12-02T15:14:12+00:00 List-Id: In <3bn13h$jmo@speedy.cci.de> jewell@cci.de (Nigel Jewell) writes: >Does anybody know of an good solution to seeing if two filenames given actually >point at the same file in the file system? (Probably a solution in C). A stat() on any file will give you a device id and an inode. These values can be used to identify a file. If you stat() both files, and both the device id and the inode are equal, then you have the same file. Only, this does not work with linked files (but with symlinks). Frank -- + Frank Pilhofer fp@informatik.uni-frankfurt.de + | Darmstaedter Str. 22 | | D-63225 Langen, Germany RAD Host (PAL/NTSC video,UNIX) | +---------------------------------------------------------------------------+