LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-07-2007, 01:24 PM   #1
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Rep: Reputation: 15
how to transfer data between two computers


Dear All,

I have two computers:

Computer A is a laptop with Suse Linux 10.0, it has wiresless internet connection

Computer B is a desktop computer with RedHat5 Enterprise, it has wired internet connection.


I want to transfer some data (~2GB) from computer A to computer B, will that be easy or possible to do? Do I have to make one of these two computers a server? In that case, do I have to have a static IP address for the server?


I in fact have tried to use an external hard drive (not linux formatted) to transfer the data between the two computers. However, after the transfer, some file name changed (like "A" becomes "a", and "B" becomes "b" ). So I am thinking if I can directly transfer the data between the two computers, as they are both linux system, such error might be avoided.

Can any one help?
 
Old 06-07-2007, 01:31 PM   #2
Centinul
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 552

Rep: Reputation: 30
There really are a large number of ways to transfer data between two systems. I think first you will have to explain or describe the network that exists between the two PCs so we can get a better understanding, and tailor the recommendation.

Some tools that come to mind to transfer files are:
cp (or scp)
rsync
ftp

HTH,

Centinul
 
Old 06-07-2007, 01:36 PM   #3
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
The following example assumes the laptop IP is 111.222.333.444, and is run on your desktop:
Code:
/usr/bin/rsync -trlpoge ssh 111.222.333.444:/path/to/data /path/to
Note: do not include the trailing / in either of the above paths. This will create the data directory under /path/to on your local system, and move all the files there.

You need to make sure you can ssh to the laptop from the destop before running the command, and you need to run the command as root.

This will take a LONG time to finish.

Last edited by forrestt; 06-07-2007 at 01:37 PM.
 
Old 06-07-2007, 01:38 PM   #4
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
i don't think there is direct connection between my two computers ( these two computers are bought at different times, and i just installed linux on them). Each computer have access to the internet, just like a normal PC.
 
Old 06-07-2007, 01:41 PM   #5
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
I don't have static IP address for either of my two computers
 
Old 06-07-2007, 01:42 PM   #6
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
You don't need to, you just need to know the IP. This can be found by running "ifconfig -a".
 
Old 06-07-2007, 01:46 PM   #7
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
Thank you!

If I want to use, for example SSH, do I have to make one of the computer a server with a static IP address?
 
Old 06-07-2007, 01:46 PM   #8
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 47
you don't really need a static IP, as long as you know it (running #ifconfig on each computer will tell you).

edit: i see forrestt already covered that, so:

how are the computers connected to the internet? do you have a router they both go through? or are they separate connections altogether (e.g., one on cable, one on dial up, etc.)?

for ssh/scp, at least one computer has to run the ssh daemon (sshd -- included in openssh). then you can log into it from the other one.

quick howto:
http://www.linuxhomenetworking.com/w...d_File_Copying

Last edited by slackhack; 06-07-2007 at 01:53 PM.
 
Old 06-07-2007, 02:01 PM   #9
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
You can also ssh into the laptop and then use the scp command to copy the needed files.
 
Old 06-07-2007, 02:06 PM   #10
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
strange. I found IP for my laptop. However, the command "ifconfig -a" doesn't work for redhat. I do both as a root.

Anyway, the two computers are both using the net service provided by my school. So I can SSH my laptop from my Desktop, right? Do I have to use my Desktop as root?
 
Old 06-07-2007, 02:07 PM   #11
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Sorry I think I misread something in your first post when i made the suggestion above. That is if you need to do repeatedly update the files on the desktop with changes you have made on the laptop.

If you just need to copy once:

Code:
scp -r 111.222.333.444:/path/to/data /local/path
 
Old 06-07-2007, 02:22 PM   #12
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
thank you.

it really took a long time just for connecting. i am sorry to ask, but is there some other ways?
 
Old 06-07-2007, 02:34 PM   #13
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
You could also tar the data to your external hard drive, and then untar it to the desktop. Attach the drive to the laptop and then:

Code:
cd /path/to/data
tar -cvf /path/to/externaldrive/laptop.tar .
Then attach the drive to the desktop and then:
Code:
cd /path/to/where/you/want/data
tar -xvf /path/to/externaldrive/laptop.tar
 
Old 06-07-2007, 02:52 PM   #14
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Like forrest said. You can use scp and tar to transfer files:

Code:
cd /path/to/files
tar -cvf files.tar .
scp files.tar user@ipaddressofB:/path/to/destination
note the ":" Also remeber to keep the "user@ipaddressofB:/path/to/destination" together with no spaces.
Also; note the "." in the tar command. The "." means "this directory."
-custangro

Last edited by custangro; 06-07-2007 at 02:55 PM.
 
Old 06-07-2007, 02:59 PM   #15
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
Honestly the easiest way is to get a usb flash drive. But ssh should work for you.
 
  


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
Connecting two computers for data transfer fc6_user Linux - Networking 4 05-16-2007 02:08 PM
Transfer data from one HD to the other?? Biggen Linux - Hardware 31 04-02-2007 03:24 PM
Data Transfer Dharma_bum07 Linux - Newbie 11 11-26-2004 01:57 PM
data transfer between two computers jamaso Linux - General 4 09-21-2004 11:22 AM
No data transfer ! shaahul Linux - Hardware 3 09-16-2003 02:08 AM

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

All times are GMT -5. The time now is 05:08 PM.

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