On Tue, Aug 05, 2003 at 03:03:51PM +0200, Stephan von Krawczynski wrote:So, he needs links that count as references, links that don't count as references but disappear if the object disappears (without dangling like symlinks), and unlinkall(), which removes an object and all of its links. He needs for the first reference to a directory to be removable only by removing all links to the object, or designating another link to be the "first" reference.
On Tue, 05 Aug 2003 14:51:46 +0200Then anybody can prevent you from removing your obsolete directories
Helge Hafting <helgehaf@xxxxxxxxxxxxx> wrote:
Even more fun is when you have a directory loop like this:How about a truly simple idea:
mkdir A
cd A
mkdir B
cd B
make hard link C back to A
cd ../..
rmdir A
You now removed A from your home directory, but the
directory itself did not disappear because it had
another hard link from C in B.
rmdir A says "directory in use" and is rejected
by creating links to them. Existing hard link don't have
such problems.