On Jan 10 2007 09:48, Andy Harrison wrote:
> On 1/10/07, Herbert Georg <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] "cd $3 ; tar cf - ." | tar xvfBp -
ssh -Tenone "$1" "tar -cC \"$3\"" | tar -xvp
for great justice.
-`J'
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]