How can I copy a directory structure but ignore symlinks?
Moved from question into answer:
As h3rrmiller pointed out, I was able to achieve this with rsync
by using the --no-links
option.
According to the documentation of the cp
command, you can use -d
option:
‘-d’
Copy symbolic links as symbolic links rather than copying the files that they point to, and preserve hard links between source files in the copies. Equivalent to
--no-dereference --preserve=links
.