Is there an easy way to copy a directory recursively where symlinks to external files/directories are resolved (target file is copied), but internal symlinks (pointing to files inside the copied tree) are kept?
touch outsidefile mkdir src ln -s ../outsidefile src/sym1 touch src/insidefile ln -s insidefile src/sym2 cp [???] src dest # or other command
$ ls dest insidefile sym1 sym2 -> insidefile
sym1 is a regular file,
sym2 keeps to be a symlink.