Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!GRINNELL.MAILNET!McGuire_Ed From: McGuire_Ed@GRINNELL.MAILNET.UUCP Newsgroups: mod.computers.vax Subject: RE: One way to detect aliased files Message-ID: <8704081631.AA02136@ucbvax.Berkeley.EDU> Date: Tue, 7-Apr-87 13:46:00 EST Article-I.D.: ucbvax.8704081631.AA02136 Posted: Tue Apr 7 13:46:00 1987 Date-Received: Sat, 11-Apr-87 07:07:21 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 30 Approved: info-vax@sri-kl.arpa > Date: 6 APR 87 17:15-PDT > From: JWHITNEY%UWARITA.BITNET@wiscvm.wisc.edu > Subject: One way to detect aliased files > > The best way I have found to detect aliases is to do a DIRECTORY/FILE_ID. > Two entries with the same file id are duplicate-link files. As for detecting > which is the original, I am unsure. The file has a backlink to its parent directory. When you enter a file in a second directory, the backlink can still only point to one directory. The backlink is not changed by SET FILE/ENTER. To see the backlink, use DUMP/HEADER. It will tell you the file id of the parent directory. Note that it does not tell you the _name_ of the directory. So, if you have a file entered in multiple directories whose names you know, compare the backlink id with the id of the .DIR files to see which one was the original. Caveat: When you run ANALYZE/DISK/REPAIR, the utility notices that the file is not backlinked to the second and succeeding directories. It `repairs' this condition by changing the file's backlink to point to a different directory. So, the info you get from DUMP/HEADER only tells you about the original directory if you haven't yet run ANALYZE/DISK/REPAIR. And everyone runs ANALYZE/DISK/REPAIR regularly, right? :-) Ed McGuire Grinnell College MCGUIRE@GRIN2.BITNET