Today I used rsync to copy some files but I found for symbolic links it will ignore them if you just use simple command line:
rsync SRC DEST
With google, I finally figure out I need to add the "--links" option.
[quote] --copy-links
Turn all symlinks into normal files (leaving no symlinks for any
other options to affect).
--links --copy-unsafe-links
Turn all unsafe symlinks into files and duplicate all safe sym-
links.
--copy-unsafe-links
Turn all unsafe symlinks into files, noisily skip all safe sym-
links.
--links --safe-links
Duplicate safe symlinks and skip unsafe ones.
--links
Duplicate all symlinks.[/quote]
rsync SRC DEST
With google, I finally figure out I need to add the "--links" option.
[quote] --copy-links
Turn all symlinks into normal files (leaving no symlinks for any
other options to affect).
--links --copy-unsafe-links
Turn all unsafe symlinks into files and duplicate all safe sym-
links.
--copy-unsafe-links
Turn all unsafe symlinks into files, noisily skip all safe sym-
links.
--links --safe-links
Duplicate safe symlinks and skip unsafe ones.
--links
Duplicate all symlinks.[/quote]
本文介绍了如何使用rsync命令正确处理符号链接。通过添加特定选项,如--links等,可以实现不同类型的链接复制需求。
1534

被折叠的 条评论
为什么被折叠?



