Using "mv" or "ditto" to merge folders in OS X

Posted by Sandro Dzneladze on Super User See other posts from Super User or by Sandro Dzneladze
Published on 2012-06-06T18:02:51Z Indexed on 2012/06/20 21:18 UTC
Read the original article Hit count: 279

Filed under:
|

Used to the Windows way of doing I just found out OS X has no merge function – moving means replacing the folder. While this does make sense, I miss merging!


I've two Wordpress directories, 1 contains default source and 2 contains worked version with plugins custom theme etc.

I want to see difference between this two, so I'm putting it on SVN. Folder 1 is already up, now in theory I should simply merge contents of 2 with 1 by replacing everything with contents of 2 but leaving hidden SVN files untouched.

Unfortunately OS X, when moving, replaces the folder so that my SVN client goes crazy and doesn't understand folder structure anymore.

So, I believe my options are mv and ditto, but which one would you use in my situation and how?

sudo mv wordpress /Documents/svn/wwwholiday/trunk/wordpress

I want mv to overwrite everything it finds, but leave alone whatever is already inside folder 1 and has no duplicate in folder 2.

© Super User or respective owner

Related posts about osx

Related posts about mv