LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 12: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, 12:58 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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, 01: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, 01:12 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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, 01:37 PM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

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



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 05:29 AM
shell script to transfer file from ftp bbgtilak Linux - General 1 12-27-2006 07:35 AM
Using BASH script to transfer a file via (s)ftp senther Linux - Newbie 2 07-19-2005 04:47 PM
How can I write a shell script to transfer files and keep permissions? LancerNZ Linux - Networking 1 02-24-2005 03:49 AM
How can I write a shell script to transfer files and keep permissions? LancerNZ Linux - Wireless Networking 0 02-24-2005 12:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:19 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
Open Source Consulting | Domain Registration