Other Copy without symlinks

Have a directory set on filesystem "A" that I want to copy to filesystem "B". "A" contains symbolic links to directories that are housed on filesystem "C". I want the copy command to RECREATE those links on "B" but not FOLLOW them. (Why would I, the content is already safe and sound over on "C"?)

I can't seems to manage to select the right set of cp(1) switches to accomplish this. Might you help?

-Cy
 
Use net/rsync, and look at the man page for the various symlink-related switches.

The answer probably depends on whether the symlinks are absolute or relative symlinks; if they are relative, they may need to be fixed up more than net/rsync can do. In that case, the answer may be a find script to locate all symlinks in the source file system, then some string manipulation of the links themselves, and then a script to recreate them.
 
The -R flag for cp(1) seem like the best fit to what you are doing. Can you show what exactly you ended up using and the output? That would make it easier to see what's going on here.
 
Back
Top