[opensuse] scp and links
By default, when scp copies links from a machine to another, it transfers the actual file instead. How can I make scp to create the corresponding link in the destination machine, instead of copying the file, and increasing the occupied space in disk? sincerely Herbert -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
onsdag 10 januari 2007 14:45 skrev Herbert Georg:
By default, when scp copies links from a machine to another, it transfers the actual file instead. How can I make scp to create the corresponding link in the destination machine, instead of copying the file, and increasing the occupied space in disk?
It can't. Use rsync instead. (You don't need an rsync server, rsync can connect to an ssh server.) -- !++ ! Lennart Börjeson, Cinnober Financial Technology AB ! Industrigatan 2A, S-112 46 STOCKHOLM ! Sverige/Sweden/Schweden/Suède ! phone:+46-8-50304717 gsm:+46-70-3394717 fax:+46-8-50304701 !-- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 1/10/07, Herbert Georg
By default, when scp copies links from a machine to another, it transfers the actual file instead. How can I make scp to create the corresponding link in the destination machine, instead of copying the file, and increasing the occupied space in disk?
Alternatively, you can tunnel tar through ssh. I keep it in a script and call it sshtar. It copies files from a remote directory into the current directory. #!/bin/sh if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then printf "\n\n\tExample:\n\n\t\tsshtar username hostname_or_ip /dir/to/copy\n\n" exit 0 fi /usr/bin/ssh $1@$2 "cd $3 ; tar cf - ." | tar xvfBp - -- Andy Harrison -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Jan 10 2007 09:48, Andy Harrison wrote:
On 1/10/07, Herbert Georg
wrote: By default, when scp copies links from a machine to another, it transfers the actual file instead. How can I make scp to create the corresponding link in the destination machine, instead of copying the file, and increasing the occupied space in disk?
Alternatively, you can tunnel tar through ssh. I keep it in a script and call it sshtar. It copies files from a remote directory into the current directory.
#!/bin/sh if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then printf "\n\n\tExample:\n\n\t\tsshtar username hostname_or_ip /dir/to/copy\n\n" exit 0 fi /usr/bin/ssh $1@$2 "cd $3 ; tar cf - ." | tar xvfBp -
ssh -Tenone "$1" "tar -cC \"$3\"" | tar -xvp for great justice. -`J' -- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Andy Harrison
-
Herbert Georg
-
Jan Engelhardt
-
Lennart Börjeson