[Info-vax] detecting links made with SET FILE/ENTER

Johnny Billquist bqt at softjar.se
Sat Sep 13 15:05:39 EDT 2014


On 2014-09-13 18:31, Stephen Hoffman wrote:
> On 2014-09-13 15:03:36 +0000, Phillip Helbig---undress to reply said:
>
>> Is there a QUICK AND EASY way to detect links which have been produced
>> via SET FILE/ENTER?
>
> Nope.    For a traditional VMS system and particularly without the hard
> links support enabled, AFAIK, there isn't a way to identify a file
> alias, short of matching FIDs.

What does hardlink support do, and in which way is this different than 
hardlinks (SET FILE/ENTER that is)? (This question might have been up 
before, but I can't remember any answer to it.)
In my understanding, SET FILE/ENTER does exactly the same thing as a 
hardlink under Unix, with the exception that VMS do not do reference 
counting on files.

The only way I know of, to find if you have more than one directory 
entry for a file is to search through the whole file system for other 
entries with the same FID.

> With hardlinks enabled, F$SYMLINK_ATTRIBUTES will return null, if it's
> not a symbolic link.  Look for a file of organization SPECIAL and type
> SYMBOLIC_LINK.

Symbolic links would be something very different and yes, I would not 
expect these to look like symbolic links.

To answer one additional question raised by the OP. All the directory 
entries are almost the same. Removing all but one directory entry and 
then delete the whole file with the last entry is what I'd recommend. Do 
not really matter which one you keep to last.
But here comes the one small detail that makes not all directory entries 
totally equal. If I remember right, ODS-2 keep the parent directory of a 
file in the file header. This is the directory where the file originally 
was created. So, if you add entries in additional directories, it is not 
reflected here. Furthermore, if you remove the original entry, this 
backpointer in the file will still point to that directory where the 
file actually no longer exists. And if the file is lost, and then 
recovered, it will be placed back in the directory pointed at in the 
file header.

	Johnny

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt at softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol



More information about the Info-vax mailing list