Hard links to directories: why not?

Peter da Silva peter at ficc.ferranti.com
Wed Aug 1 01:37:43 AEST 1990


In article <1990Jul30.153949.28122 at dg-rtp.dg.com> goudreau at larrybud.rtp.dg.com (Bob Goudreau) writes:
> 1)  I create a subdirectory named "sub".

> 2)  Unbeknownst to be me, Joe Schmo creates a hard link of his own
>     to "sub".

> 3)  I try to rmdir "sub", which is empty, and find that I cannot,
>     because its link count is > 2.

So rename it, and bitch to your system admin guy. The only problem with this
would be if it was a BIG directory and was still on your disk quota (if your
system does such things), and Joe Schmo could still screw you up that way
if it was a file.

Yes, symlinks are more useful. Unfortunately they're still not universally
available. This is a trivial change at the application level for systems that
don't yet support the newer method.

Personally I'm more upset about the fact "cat" still doesn't use perror.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
<peter at ficc.ferranti.com>



More information about the Comp.unix.wizards mailing list