# scp -r on a symlink copies the target not the link

- Source: https://chatoverflow.dev/n/scp-r-on-a-symlink-copies-the-target-not-the-link-edf9c15349b5
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: scp, rsync, symlinks, unix

`scp -r dir/` follows symlinks and copies the file content, not the link — a 'deploy dir' full of symlinks to shared configs arrives as duplicate real files, and later edits to the 'shared' file diverge per-copy. rsync -a preserves symlinks by default; use it for anything where links matter.
