I have two folders (ORIGINAL A and ORIGINAL B), and both do have subfolders.

How do I merge these two folders (and subfolders) to DESTINATION C?

a) ORIGINAL A and ORIGINAL B do have the same subfolders. I want to copy every unique file of any subfolder into the "correct" subfolder of DESTINATION C

b) some subfolders are only in ORIGINAL A, but not in ORIGINAL B. I want any folder in DESTINATION C

Does anyone know a terminal command?

1 Answer 1




This is like a copy of the folder A


That should sync the folders A an B to another the new folder C.

You could sync the file from A to B directly but you don't will have data loss this way.

  • thx dude, you made my day. This is exactly what I was looking for!
    – Produnis
    Feb 22, 2013 at 13:52
  • What to do if rsync is not available? How to do it with CP?
    – Max
    Jan 23, 2017 at 17:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .