LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   shell script for file transfer (https://www.linuxquestions.org/questions/linux-newbie-8/shell-script-for-file-transfer-564171/)

bhandu 06-24-2007 12:45 PM

shell script for file transfer
 
Hi,
I want to tranfer or copy a file from one Linux server to another Linux server using a shell script. Can anyone help?

Tinkster 06-24-2007 12:58 PM

Maybe if you were more specific about your requirements,
and the possible facilities? Won't a plain scp do?


Cheers,
Tink

bhandu 06-24-2007 01:07 PM

I have a file on a Linux server say Server 1 and I want that file to be transfered via a shell script to a another linus server Server 2

Tinkster 06-24-2007 01:12 PM

What do you mean when you say via "shell script". What's
the process you need to mimic, what is the expected outcome?
Code:

#!/bin/bash
scp /path/to/file1 server2:/path/to/file1

Just make passwordless ssh authentication possible for the
user account that runs this ...


Cheers,
Tink

nx5000 06-24-2007 01:37 PM

Quote:

Originally Posted by bhandu
I have a file on a Linux server say Server 1 and I want that file to be transfered via a shell script to a another linus server Server 2

And where will the shell script be launched
server1
or
server2
or
server3

?


All times are GMT -5. The time now is 01:24 PM.