Hard links to directories: why not?

Jonathan I. Kamens jik at athena.mit.edu
Wed Jul 25 14:49:52 AEST 1990


In article <3742 at auspex.auspex.com>, guy at auspex.auspex.com (Guy Harris) writes:
|> I've used versions of "mv" that existed before "rename()" existed,
|> and they did what you describe the "newer versions" as doing; they were
|> standard "mv"s from standard distribution tapes.  I seem to remember
|> *all* versions of "mv" doing the latter, at least as far back as V7....

  Sorry I didn't cover this in my original posting, but I'm not as old
as you are :-).

  Yes, before the rename system call existed, all mv's did basically
the same thing as cp (but they deleted the original after successful
writing of the copy).  However, when rename was created, many vendors
(although not all, I'm sure) changed mv to use rename exclusively and
to fail if the rename failed.  Many of those same vendors have more
recently once again modified mv to do what the original, pre-rename mv
did if the rename system call fails because of an attempt at
cross-device renaming.

  Versions of mv that know how to copy have become more and more
important (and therefore more and more common) as more filesystem
types (NFS, AFS, RFS, RVD, and what-have-you) have been developed,
and as hardware has become more powerful.  After all, the more
filesystem types you have, and the more powerful your hardware, the
more likely it is that any particular "mv" you do is going to be
across two different devices.

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710



More information about the Comp.unix.wizards mailing list