Hard links to directories: why not?

Jeffrey Mulligan jbm at eos.UUCP
Thu Jul 19 04:23:30 AEST 1990


wiml at milton.u.washington.edu (William Lewis) writes:

>   In the man entry for ln(1) (and for link(2)),  it says that
>hard links may not be made to directories, unless the linker is
>the super-user (in order to make '.' and '..', I suppose). My 
>question is: why not?

What should be the output of the last command of this sequence?

mkdir dir1
mkdir dir2
mkdir dir1/a_directory
ln dir1/a_directroy dir2/directory_link
cd dir2/directory_link
cd ..
pwd


-- 

	Jeff Mulligan (jbm at eos.arc.nasa.gov)
	NASA/Ames Research Ctr., Mail Stop 262-2, Moffet Field CA, 94035
	(415) 604-3745



More information about the Comp.unix.wizards mailing list