Running the copy command as
sudo cp -v -r -f source destination, for few directories and files, getting error as
cp: cannot overwrite directory with non-directory.
CASE 1 You get this error when you try to copy a file (source) that has the same name of a directory (destination).
CASE 2 You get this error when you try to copy a symlink (source) in a directory (destination) where there is already an object with the same name.
Use rsync. See also the following options about symlinks
-l, --links copy symlinks as symlinks
-L, --copy-links transform symlink into referent file/dir
--copy-unsafe-links only "unsafe" symlinks are transformed
--safe-links ignore symlinks that point outside the tree
-k, --copy-dirlinks transform symlink to dir into referent dir
-K, --keep-dirlinks treat symlinked dir on receiver as dir
Otherwise: manually remove the object from destination path (or move, or rename), then copy the object from the source path.