LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-24-2007, 01:45 PM   #1
bhandu
LQ Newbie
 
Registered: Mar 2006
Posts: 22

Rep: Reputation: 15
Exclamation 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?
 
Old 06-24-2007, 01:58 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

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


Cheers,
Tink
 
Old 06-24-2007, 02:07 PM   #3
bhandu
LQ Newbie
 
Registered: Mar 2006
Posts: 22

Original Poster
Rep: Reputation: 15
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
 
Old 06-24-2007, 02:12 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 06-24-2007, 02:37 PM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
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

?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script to find out time taken to transfer a file aeby Linux - Networking 1 05-09-2007 06:29 AM
shell script to transfer file from ftp bbgtilak Linux - General 1 12-27-2006 08:35 AM
Using BASH script to transfer a file via (s)ftp senther Linux - Newbie 2 07-19-2005 05:47 PM
How can I write a shell script to transfer files and keep permissions? LancerNZ Linux - Networking 1 02-24-2005 04:49 AM
How can I write a shell script to transfer files and keep permissions? LancerNZ Linux - Wireless Networking 0 02-24-2005 01:19 AM


All times are GMT -5. The time now is 11:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration