Subject: Re: oops - hard linked directories :(
To: None <mwilley@hillres142.cc.purdue.edu>
From: Charles M. Hannum <mycroft@gnu.ai.mit.edu>
List: netbsd-help
Date: 01/18/1995 22:49:34
I feel like the Sorcerer's Apprentice. (from Walt Disney's "Fantasia") I
peeked in the source for ln and learned how to make a hard link on a
directory.
Now, I am having a little problem removing it. ;-)
Okay, I did:
mkdir test test/dir1 test/dir2
cd test/dir1
ln -F ../dir2 dir2shadow
when I do a rm -f or rmdir on either dir2 or dir2shadow, it laughs at me.
More specifically, it says "directory not empty". Can someone help???
You need to call unlink(2) directly on the extra link, as root.
There's a good reason that option to ln(1) is undocumented.