[mod.computers.vax] One way to detect aliased files

JWHITNEY@UWARITA.BITNET.UUCP (04/07/87)

Regarding SET FILE/ENTER and SET FILE/REMOVE...

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.

Jay Whitney

McGuire_Ed@GRINNELL.MAILNET.UUCP (04/07/87)

> 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

dp@JASPER.PALLADIAN.COM (Jeffrey Del Papa) (04/08/87)

    Date: 6 APR 87 17:15-PDT
    From: JWHITNEY%UWARITA.BITNET@wiscvm.wisc.edu

    Regarding SET FILE/ENTER and SET FILE/REMOVE...

    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.

    Jay Whitney


If you look in the index file entry, you will find the original name.

<dp>