why scp command not copy links from local copmuter to other ( how to copy the links)

as

 scp -rp dir linux:/dir_target

remark in dir I have files and links

link|improve this question

79% accept rate
are both computer are linux and those are symbolic links ? – Matthieu Jan 14 '11 at 4:34
dir have simbolic links – jennifer Jan 14 '11 at 5:54
feedback

1 Answer

up vote 0 down vote accepted

If I understand what you want correctly. You want to exactly mirror dir on the local machine to dir_target on linux, and it is copying the contents of the symlink, rather than copy the symlink itself. To make an exact duplicate, you need to use rsync instead of scp.

rsync -Wav --progress dir linux:dir_target

I suspect that will have the desired result. I generally use rsync anyway because it will only copy files that need to be copied, and generally is more intelligent than scp.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.