I need to copy a directory tree full of symlinks to files on a different mount, but buried in the directory are 2 or 3 symlinks to directories outside of the copy tree. II need to copy the symlinks pointing to files as actual files but keep the 2 or 3 symlinks to directories as symlinks.
"scp -L"scp -L
dereferences everything
I tried "rsync -avHS"rsync -avHS
followed by "rsync -avHS --keep-dirlinks"rsync -avHS --keep-dirlinks
or "rsync -avHS -K"rsync -avHS -K
but those preserve both file and directory links on the destination so you end up with nothing dereferenced.