Merge folder contents in OSX/*nix


Re: Merge folder contents in OSX/*nix
#2
I don't know if there's a quick simple answer to your question or not. However, I have some answers.

If you unzip a file from the command line, unzip will ask if you want to replace existing files, and one of the responses is to replace all files. The -o command line option should also cause it to overwrite without prompting. Additionally, LDView will automatically download official updates and install them for you, so for LDraw updates of official parts, that's what a lot of people here suggest to new users (which obviously you are not).

In general, you can use the unzip command line behavior to do this for any directory. Right click on the directory in Finder and select the Compress item. This will create a zip file with the same name as the directory. Then go to the parent directory of the destination in a Terminal window, and use unzip -o <zip filename>. This zip stuff should work in just about any *nix, since zip/unzip command line tools are often installed by default.

Also, if you're on the command line anyway, cp -R does a recursive copy, and it should "merge" by default.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: Merge folder contents in OSX/*nix - by Travis Cobbs - 2012-01-24, 2:35

Forum Jump:


Users browsing this thread: 1 Guest(s)