Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mcnc!unccvax!cs75jmc From: cs75jmc@unccvax.UUCP (John Covington WN4BBJ) Newsgroups: comp.sys.ibm.pc Subject: Re: Symbolic links in DOS (a la Unix) ? Summary: yet but CHKDSK will not like it.... Keywords: Putting the FAT in the fire Message-ID: <1583@unccvax.UUCP> Date: 4 Aug 89 02:04:17 GMT References: <5569@arcturus> Organization: Univ. of NC at Charlotte, Charlotte, NC Lines: 44 In article <5569@arcturus>, mitch@arcturus.UUCP (Mitchell S. Gorman) writes: > > Had a strange thought last nite, so naturally I figured I'd throw > it out on the net to see what happens... > > What problems would occur if one should attempt to implement a > unix-like symbolic link to directories by creating an entry in a directory > that has a FAT start-point that is the same as a "real" directory somewhere > else in the tree? > > To clarify (hopefully :^) the question: imagine, if you will, a > directory under the root, called REAL. Imagine, also, another directory > under the root which is named TEST. Suppose that in the directory info for > the root, the entry for REAL has a pointer to a given sector x in the FAT. > If we then create an entry under \TEST called LINK, set the entry's > directory bit, and set its FAT pointer to be the same as that of \REAL > (namely, set it to x), then will files located under \REAL be accessible > through the path \TEST\LINK, and vice versa? > This will work but under DOS this is called a cross-linked file. If you run CHKDSK it will report it as a File cross-linked on cluster ####. You are basically asking for trouble if if you do this in the DOS world. In general, a cross-linked file is considered to be an error and the behavior is unpredictable. Consider this: You create two subdirectory entries and zap them so they point to the same cluster. You then copy 300 files into the one called \TEST. A normal subdirectory starts out holding something like 144 files and is extended to accomodate additional files. The length of \TEST as stored in the root directory will be increased, but \REAL will not be modified. What will DOS do then when you access \REAL? Will it follow the FAT chain to determine the length of \REAL or will it go as far as the root directory entry says it can go? I am sure this would work only as long as you don't dump over 144 files into the subdirectory; otherwise some strange things are likely to happen. John Covington WN4BBJ E-mail: cs75jmc@unccvax.UUCP P.O. Box 217122 MCI Mail: JCOVINGTON 342-6957 Charlotte, NC 28221-7122 Packet Radio: WN4BBJ @ KK4L (704) 537-7653 "Give it back, Eric, it's not yours" (the ICOM)