-----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 [EMAIL PROTECTED] -----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----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]