I have a directory on my computer (Kubuntu 22.04) that I want to copy to an external drive. The directory has subdirectories with multiple files in them. The external drive has the same folder structure and also contains
some of the folders and
some of the files. I would like to copy only files that do not exist on the destination drive.
I am not getting the result that I want so to simplify the issue I made a test setup to see if I can figure this out. In the test setup the source directory is located at /home/dave/Pictures and there are two subdirectories within. I want to copy both of those directories to the external drive at /media/dave/NO_LABEL/Pictures
The first photo shows the source on the left and the destination on the right, with the copy command below. I am using:
cp -r -n /home/dave/Pictures/ /media/dave/NO_LABEL/Pictures/
I was expecting that the directory structure on the right would be maintained and any missing files updated and any existing files skipped. However, as shown in picture 2, it simply copied the entire 'Pictures' directory from the source and put it inside the "Pictures" directory in the destination.
Is there something simple that I am missing with the cp command?