Code Comments
Programming Forum and web based access to our favorite programming groups.I use 'scp' to copy files from one server to another. Looking deeper into the file structure it is obvious that symbolic links are copied as files (i.e. they do not appear as links on the destination side). How can I solve this? Any alternative to scp? Best regards, Kenneth
Post Follow-up to this messageKenneth Brun Nielsen wrote: > I use 'scp' to copy files from one server to another. > > Looking deeper into the file structure it is obvious that symbolic > links are copied as files (i.e. they do not appear as links on the > destination side). > > How can I solve this? Any alternative to scp? Well, my usual answer is: use rsync, which runs over ssh anyway. Another option is to tar the data across the network, eg usually some variation of (GNU tar) tar -czvf - /src/dir | ssh remotehost "(cd /dst/dir ; tar -xzvf -)" -- All the commands are tested with bash and GNU tools, so they may use nonstandard features. I try to mention when something is nonstandard (if I'm aware of that), but I may miss something. Corrections are welcome.
Post Follow-up to this messagepk wrote: > eg usually some variation of (GNU tar) > > tar -czvf - /src/dir | ssh remotehost "(cd /dst/dir ; tar -xzvf -)" or tar cv /src/dir | ssh remotehost tar xvC /dst/dir -- Best regards | Monica Lewinsky's X-Boyfriend's Cyrus | Wife for President
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.