Why aren't (hard) links to symbolic links allowed?

David Collier-Brown davecb at yunexus.UUCP
Thu May 10 10:34:26 AEST 1990


leo at ehviea.ine.philips.nl (Leo de Wit) writes:
| Bjorn's question seems a valid one; a rename() emulated by a
| link()/unlink() pair fails for the above reason in the case of a
| symbolic link (one is left with a hard link to the original
| softlinked-to file, instead of a different name for the previous soft
| link).

  Soft and hard links don't exactly mix well: the semantics are too
different.  I vaguely recollect one of the triple [Kernighan|Ritchie|Thompson]
commenting that BSD should have removed the hard links if they were planning
on adding soft ones.

  Specifically, the definition of a symlink as "something that when
referenced is evaluated to produce a pathname" leads one to interpret the
creating of a link to a symlink as creation of a link to the referred-to
thing...  Yet a symlink has a separate existance, can be seen in an ls, etc.
which leads the unwary to trip over the (operational) definition and go
crashing into "this make no sense" land.
  If it had a better definition, maybe I could reason about it better...

--dave
-- 
David Collier-Brown,  | davecb at Nexus.YorkU.CA, ...!yunexus!davecb or
72 Abitibi Ave.,      | {toronto area...}lethe!dave 
Willowdale, Ontario,  | "And the next 8 man-months came up like
CANADA. 416-223-8968  |   thunder across the bay" --david kipling



More information about the Comp.unix.wizards mailing list