Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 1996 13:16:45 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, mrm@MARMOT.Mole.ORG, zach@blizzard.gaffaneys.com
Cc:        freebsd-bugs@freefall.freebsd.org
Subject:   Re: bin/1375: Extraneous warning from mv(1)
Message-ID:  <199607100316.NAA20926@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> attributes.  I now think it should refuse to the move if it can't
>> preserve all the attributes.  It can simply unlink the target and
>> avoid unlinking the source if there is a problem.

>Or, one could leave it as it is, and accept the known, rather predictable,
>and simple behavior instead of a more complicated and unknown behavior.

To predict the behaviour, you need to know if the move is across file
systems and the current bugs in mv.  Only mv's within a file system
are predictable.

Another bug in mv:

	touch /tmp/z
	chflags uchg /tmp/z
	mv /tmp/z /tmp/z1	# Fails as expected
	mv /tmp/z ~		# Copies the file to ~/z, then fails to
				# unlink ~/z, leaving two copies of the
				# file, one without the uchg flag.

If mv happens to use `cp -pRP' (which it does for everything except regular
files) then the result is similar.  cp knows about file flags and sets the
uchg flag in the copy, except of course if the target file system doesn't
support the uchg file flag.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607100316.NAA20926>