A suggestion: .... == ../../..

der Mouse mouse at mcgill-vision.UUCP
Wed Apr 27 07:47:44 AEST 1988


In article <4221 at vdsvax.steinmetz.ge.com>, barnett at vdsvax.steinmetz.ge.com (Bruce G. Barnett) writes:
> In article <75 at vertical.oz> greg at vertical.oz (Greg Bond) writes:
>> This generalises: . = current dir, .. = parent dir, ... = grandparent etc.
>> This could be done in the shells [...]. It would more usefully be
>> done in the kernel routine (namei?) that maps names to inodes (where
>> the symbolic links are traversed).
> The beauty of the current implemenetation is that the file system
> does most of the work.  That is, the files '.' and '..' are really
> there.

Only sort of.  .. must be special-cased to make it work properly across
mount points, and I would be surprised to find that . is not
special-cased.  A dozen bytes of code in the kernel is cheaper than
actually going to the disk to follow . when you see it.

					der Mouse

			uucp: mouse at mcgill-vision.uucp
			arpa: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.unix.wizards mailing list