bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#389432: mv: cannot move directory into an already populated dire


From: Eric Blake
Subject: Re: Bug#389432: mv: cannot move directory into an already populated directory
Date: Mon, 25 Sep 2006 20:51:20 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666

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

According to Jim Meyering on 9/25/2006 3:51 PM:
>>      $ mkdir -p 1/a/b 2/a/c
>>      $ mv 1/a 2/
>>      mv: cannot move `1/a' to a subdirectory of itself, `2/a'
>>      $ rmdir 2/a/c
>>      $ mv 1/a 2/
>>      $
>>
> Thanks for the report, but mv can't do that -- at least not by default.
> 
> It might make sense to add an option to make mv work this way,
> if you can make a good enough case for it.

This capability is present in Windows.  When you move one subtree into
another folder that contains a similar subtree, the gui prompts whether
the move should proceed to update all contents by the same name.  Being
able to do this from a command line would be rather nice.  I would suggest
the name --merge for both cp and mv.  Semantics would be that directories
encountered during the traversal of the subtrees are handled specially,
such that destination directory ends up as the merge of the two subtrees
(any relative name present in both source and destination trees comes from
the source, all other relative file names in the destination remain
unchanged).  But of course, without an actual patch, this is just wishful
thinking for now...

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFGJWo84KuGfSFAYARAko/AJsGzpmrlXga16i74vp/IDYCItBJKgCeNgS0
8cDTD4HUt+FNOLNrvbNNCbU=
=jR/2
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]