Linking directories on Xenix???

Matthew Thurmaier thurm at shorty.CS.WISC.EDU
Fri Aug 25 02:55:35 AEST 1989


In article <1114 at ispi.uucp> Jonathan Bayer writes:
> I have a need to be able to link a directory to another directory.  I
> know that it normally is not possible, but ...

Jonathan,

	This is somewhat of a KLUDGE, but see if you can get it to work.  I have
not had time to try it myself, so there are NO PROMISSES, just hunches:

1.) We know that a directory is really just a way of maping file names to
	i-nodes.

2.) We know that directories have i-node #s, just like any other file.

3.) We know that directories entries may only be made by root.

4.) We know that the structure of a directory entry is listed in <sys/dir.h>

SO,

Write a program which you execute as root, which includes <sys/dir.h>, opens the
directory that you want to link to, gets it's i-node number and other vital
information (note that if you open that directory, the "." entry represents
the directory itself), then open the directory in which you want to make the
new link entry and create an entry with the same information, only with the 
name changed to whatever you want, instead of ".".

Let me know how it turns out.

Matthew.
make sure that 
Snail Mail:                                 E Mail:
Matthew J. Thurmaier                ...!{allegra,harvard,seismo}!shorty!matt
The Computer Classroom              matt at shorty.wisc.edu
6701 Seybold Road, Ste. 122
Madison, WI 53719
(608) 271-2171
                                  "why am I ALWAYS going somewhere?" >>-matt-->



More information about the Comp.unix.xenix mailing list