linking directories (was Re: A suggestion: .... == ../../..)
David Goodenough
dg at lakart.UUCP
Wed May 4 01:39:11 AEST 1988
>From article <1236 at zen.UUCP>, by vic at zen.UUCP (Victor Gavin):
> ..... much stuff deleted .....
> ps Why do you have to be super-user to link directories?
Consider the following:
% cd /u2/dg
% mkdir foo
% mkdir foo/barf
% mkdir foo/barf/gag
% unlink .. ; UGH NUMBER 1
% ln /u2/dg/foo/barf/gag .. ; UGH NUMBER 2
% pwd
OOPS - Looks like we have a loop in the directory structure - pwd is going
to have a nervous breakdown.
In general the damage that can be done by linking and unlinking directories
is just too horrific to think about.
--
dg at lakart.UUCP - David Goodenough +---+
| +-+-+
....... !harvard!adelie!cfisun!lakart!dg +-+-+ |
+---+
More information about the Comp.unix.wizards
mailing list