lee_d@apollo.uucp (David Lee) (01/30/88)
Is there a way to implement a unix file link on vms? What I want done is to have two filenames both pointing to the same file on disk. e.g. the file file1.dat exists on disk link file2.dat file1.dat now file2.dat and file1.dat both accesses the same physical file. I would appreciate any suggestions on how to do this. Please send me mail if possible. Thank you. David Lee.
hydrovax@nmtsun.nmt.edu (M. Warner Losh) (01/31/88)
In article <39f762da.8784@apollo.uucp>, lee_d@apollo.uucp (David Lee) writes: > > Is there a way to implement a unix file link > on vms? What I want done is to have two filenames > both pointing to the same file on disk. RTFM, Well, I shouldn't be so gung ho about this, but it IS in the DCL DICTIONARY, pp DCL-442 - DCL-446 (Version 4.4 of VMS). $ SET FILE/ENTER=File2.txt file2.txt will "link" file2.txt and file1.txt together. Quoted from Pg DCL-443 of the above manual /ENTER=new-file-spec Enables you to assign an additional name to a file. The file now has a second name, or alias, but both the original name and the alias reference the same file. For this reason, care should be taken when deleting files which have aliases. In order to keep the file but remove one of its names, use the /REMOVE qualifier with SET FILE. No wildcards are allowed in the file specification. User of the /ENTER qualifier is discouraged. End of Quoted material. This facility appears to be around for the PRINT command and all of the machinery that goes with it. Beyond that, I don't know how it is used. I tried using it for a while, but got burned when I accidentally deleted one of the file references....(ANAL/DISK IS WONDERFUL ....) Hope that this helps your problem. -- bitnet: losh@nmt.csnet M. Warner Losh warner@hydrovax.nmt.csnet ! Don't know if this works, let me know. csnet: warner@hydrovax.nmt.edu uucp: ...{cmcl2, ihnp4}!lanl!unmvax!nmtsun!warner%hydrovax
rrk@byuvax.bitnet (02/01/88)
Look at help on the command: $ set file/enter=nn2 nn1
mic@ut-emx.UUCP (Mic Kaczmarczik) (02/04/88)
In article <68rrk@byuvax.bitnet> rrk@byuvax.bitnet writes: >Look at help on the command: >$ set file/enter=nn2 nn1 And read it *very* carefully. Creating a file entry in this manner makes a new name for the file, but does *not* make the new name a complete substitute for the old one. As I understand it, this is because unlike Unix, where the file header does not contain any information about a file's name, VMS file headers do. There is also a reference to the file's parent directory. Thus there is a ``primary'' name for a file, and any other name entries (as created by SET FILE/ENTER) are ``secondary''. This doesn't mean that extra file entries shouldn't be used, but they should be used with care. Depending on your application, they may or may not be useful for simulating Unix-style hard file links, so be sure to read the documentation before you create any. Mic Kaczmarczik P.S. My apologies in advance for any misstatements or inaccuracies; it's been a while since I've dealt with file entries. -- Mic Kaczmarczik don't push me 'cause I'm standing in line. UT Austin Computation Center here -- calm down -- have a sip of wine. mic@emx.cc.utexas.edu it's like a party sometimes it makes me wonder CCEP001@UTADNX.BITNET how I keep myself so slender