Hard links to directories: why not?

John F. Haugh II jfh at rpp386.cactus.org
Sun Jul 29 06:24:00 AEST 1990


In article <1990Jul23.083256.17790 at athena.mit.edu> jik at pit-manager.mit.edu (Jonathan I. Kamens) writes:
>  Are /dev and /usr/tmp on your machine on different partitions?  If
>so, then the behavior of mv is understandable.

No, it is not understandable.  It doesn't take much work to do a
mknod() on the device major/minor numbers from stat().

The description for mv(1) is 

	"mv moves (changes the name of) file1 to file2."

On the bottom, under "Notes:" it says that mv must copy the file
it it exists on another filesystem.  So, someone did half the
work to notice the filesystems were different, but never bothered
to see if it was a device or FIFO object.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh at rpp386.cactus.org



More information about the Comp.unix.wizards mailing list