I am in the middle of merging 2 directories into 1.

/competitions/1
/competitions/2
/competitions/3

/gallery/1
/gallery/2
/gallery/3

I want to copy all the files in /competitions to /gallery and put them in there respective folders. I can assume that all file names are unique and will not be copied over.

How can I do this with rsync?

up vote 2 down vote accepted
rync -av /competitions/* /gallery 

should do the trick.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.