rsync and broken symlinks

Yakov Hrebtov jake at generation.ru
Thu Dec 16 05:36:05 GMT 2004


Hello!

I need a suggestion.
How to copy broken symlink as symlink with rsync?

Example:
# mkdir src
# ln -s file-that-doesnt-exist src/broken-link
# rsync -a src/ dst/
# ls -l src/
total 0
lrwxrwxrwx    1 root     root           22 Dec 16 10:31 broken-link -> file-that-doesnt-exist
# ls -l dst
total 0

I want src/ and dst/ to be identical after sync.
-- 
WBR, Yakov Hrebtov                          mailto:jake at generation.ru



More information about the rsync mailing list