I have two directories
dirDest in different remote servers. Both of them have numerous subdirectories at various depths. I now need to copy a specific file or extension -- say
file1.txt recursively from
dirDest. But, I need to copy the file only if the subdirectory is already present in
For example, I can systematically copy only a specific file from source to destination using rsync using
rsync -zarv --prune-empty-dirs --include "*/" --include="file1.txt" --exclude="*" "dirOrig" "dirDest"
But how to restrict this copy only to the subdirectories present in the destination (