Here is my scenario:
I have an Eclipse project in my desktop in a folder named eclipseProject. Now, I have another folder in my desktop named Prod, this folder has a directory structure for some files that also exist in eclipseProject.
What I want to do is to copy the files in Prod to the eclipseProject folder but they must be copied to the same directory structure but without affecting other files that may be in the same folders, i.e.
eclipseProject folder
-folder1
-subfolder1
-file1
-file2
-subfolder2
-file3
…
Prod folder
-folder1
-subfolder1
-file1
How do I copy all the Prod directory structure to eclipseProject but not affecting file2 and file3 so only file1 gets replaced.
Hope I’ve made myself clear.
Thanks in advance!
Use gnu
cpcommand with--parentsoption.OR use rsync as: