-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Michal Wencl on 11/18/2007 3:16 AM:
> mkdir -p a b/a
> touch a/1 a/2 b/a/2
> move a b
> 
> Current result:
> 
> In my version of mv (5.97) the following error message is returned:

Consider upgrading.  The latest stable version of coreutils is 6.9, and it
includes some bug fixes for mv.

> Expected result:
> 
> Directory a is fully moved to directory b/a, thus b/a contains files
> 1 and 2 where b/a/2 was overwritten witch a/2.

Wrong.  POSIX doesn't allow this behavior.  In order to move directory a
to a subdirctory of b, when b/a already exists, b/a must be unlinkable;
but since b/a is not empty, it can't be unlinked.

> Could you think about it, please? It would be great if at least a
> switch for it was added to mv (and other coreutils).

What you appear to be wanting is a new option to mv, maybe spelled like
'mv --merge'.  But such a feature is not part of coreutils yet, because no
one has submitted a patch for it.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHQDw684KuGfSFAYARAvTiAJ4iBg1Ao0I16Y4vcxSIrtJJ4aeUUwCdGOd1
fUxP2Kr0h+vbSm0mRrjD8mQ=
=z0MJ
-----END PGP SIGNATURE-----


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to