LinuxQuestions.org
Review your favorite Linux distribution.
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 05-05-2008, 05:12 PM   #1
borgibo
Member
 
Registered: Aug 2007
Posts: 47

Rep: Reputation: 15
Copying-transferring files between two PCs.


Well hello!

Since you encourage me to post it will be only you to blame !

I am a completely computer illiterate and I ask to be excused if my questions seem outrageous.

Here is one: I want to move files from a hdd of computer 'a' to a hdd of computer 'b'. The machines are phisically independed, they share though the same web line. They are near each other, so I thought to ask if it is feasible to connect them with a usb cable and proceed with the cp or dd command, or since this is not very likely, if I could dismount one of the hdd and connect it temporarily on the other machine and proceed thus.

Will the host machine recognize the visitor and behave, or will it swear and misbehave at everybody ? the files are videos about 30GB.

This is it !

Regards,


borgibo the illiterate
 
Old 05-05-2008, 05:24 PM   #2
sowell
LQ Newbie
 
Registered: Jul 2007
Posts: 18

Rep: Reputation: 0
There are a ton of ways you can accomplish this task. If you have a gigabit/100 base T router/switch you could always copy it over the network through either scp or rsync.

The method you are talking about using should work fine as long as the drives are setup properly. Obviously the drive you place in the other computer would need to be a slave and you could just mount the drive and copy the files using a standard cp.

sol
 
Old 05-05-2008, 05:33 PM   #3
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
When you say they share the same web line, does that mean that they are networked somehow? A better explanation of how thing are physically set up would be useful
 
Old 05-08-2008, 05:29 AM   #4
borgibo
Member
 
Registered: Aug 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Wow that was fast!

sowell and billymayday thanks a lot.

Here is some more information re my machines: I have a "ADSL Bridge/Router make microcom AD 2636 DSL ACT 100M/ACT" connected to my telephone line from one side and hence to ISP I believe, to the other side to a "5 Port 10/100M Switch" where my two machines are pluged, Ethernet RJ45, one, the host in this case, in Port 1 and the receiver in Post3. The other 3 Ports are empty.

I had a look at man pages for scp and rsync, finding the first simpler. The problem now is in scp how to specify each machine. Knowing roughly that my rooter allocates an IP address to each computer at boot and that presently the host has 10.0.0.10 and the receiver 10.0.0.14 should I go: scp /etho_10.0.0.10/dev/hdb8/home/jv/movies/miro(space) /etho_10.0.0.14/dev/hdb6/home/jv/movies/miro ?

Or something like that ?

Afraid to give it a try lest I break up something, I will wait for instructions. Use $ or # ?



Thanks a lot again,


borgibo
 
Old 05-08-2008, 05:53 AM   #5
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I don't use scp myself (I tend to use rsync), but the format would be

scp source_file borgibo@10.0.0.14:/home/jv/movies/miro

Assuming borgibo is the user on the second machine (actually I guess jv would be the user instead on borgibo).

Try it with a meaningless file in the first instance. This will create source_file in the directory /home/jv/movies/miro on machine 10.0.0.14

Hope it works

Last edited by billymayday; 05-08-2008 at 06:03 AM.
 
Old 05-08-2008, 08:15 AM   #6
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
I am pretty sure scp uses ssh so you'll need the ssh daemon to be both installed and running on the destination computer or it will not be "listening" for a connection.
 
Old 05-08-2008, 08:36 AM   #7
sowell
LQ Newbie
 
Registered: Jul 2007
Posts: 18

Rep: Reputation: 0
The way ive always used the scp is command is as follows:

Code:
scp user@10.0.0.10:/path/to/movies /path/where/you/want/them/locally
If you want to copy an entire directory of files in one command you would want to use -r as follows...

The way ive always used the scp is command is as follows:

Code:
scp -r user@10.0.0.10:/path/to/moviedir /path/where/you/want/them/locally
So usually you would run this command from the machine you are actually moving the files TO. Again, like stated above, you will want to make sure you have ssh on both machines.

make sure your permissions on those files are for the user trying to grab the files otherwise you will get an error.

Hope this helps.

-sol

Last edited by sowell; 05-08-2008 at 08:46 AM.
 
Old 05-08-2008, 08:59 AM   #8
borgibo
Member
 
Registered: Aug 2007
Posts: 47

Original Poster
Rep: Reputation: 15
This is great!

How do I find out if I have ssh ? illiterate's question !


borgibo
 
Old 05-08-2008, 10:02 AM   #9
sowell
LQ Newbie
 
Registered: Jul 2007
Posts: 18

Rep: Reputation: 0
Code:
locate sshd
OR

Code:
find /usr -name sshd
What flavor of linux are you using, this will help me help you?

-Sol
 
Old 05-08-2008, 11:14 AM   #10
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Quote:
How do I find out if I have ssh ?
It may be installed, but you need it to be running (as a "System Service")
To find out if it is running:
Code:
ps -Al | grep sshd
If you see the sshd process there, it's running.
If not, start it like this (you'll need to be root, or you'll get "Permission Denied")
Code:
/etc/init.d/ssh   start
[Edit:]If this gives you "-bash: /etc/init.d/ssh: No such file or directory"
Then it's not installed, and you'll need to do that before you can go further. If you tell us your distro (Ubuntu, PcLinuxOS, Debian etc) someone will be able to tell you how.

It is a good idea to list your distribution in your profile anyway (See mine, at the left?) [/Edit]

Last edited by tredegar; 05-08-2008 at 11:59 AM.
 
Old 05-08-2008, 11:33 AM   #11
sowell
LQ Newbie
 
Registered: Jul 2007
Posts: 18

Rep: Reputation: 0
^^what he said .
 
Old 05-08-2008, 02:41 PM   #12
seraphim172
Member
 
Registered: May 2008
Posts: 101

Rep: Reputation: 15
ftp server

You could install and setup a very plain FTP server on one of the machines (or both of them), so you could use a graphical FTP client to move files comfortably back and forth. Or if you run KDE then open the other location in Konqueror using the 'fish' protocol (a variation of SSH access).

Linux Archive

Last edited by seraphim172; 06-05-2008 at 10:47 AM.
 
Old 05-08-2008, 04:14 PM   #13
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
@seraphim172
Yes, he could install an ftp server. As usual with linux, there are many ways to achieve what is required. But borgibo is new, so shall we just try to concentrate on one way to achieve what he wants? That is to move some files between two (probably, "badly" networked computers).
We are trying to help him move the files (with his PCs addressed by LAN IP numbers if necessary). Once his goal is achieved, he might be interested in making life easier for himself.

When he has manged to move his files, perhaps he'll be interested in learning about some of the other neat things he can do with linux.

Quote:
Or if you run KDE then open the other location in Konqueror using the 'fish' protocol (a variation of SSH access)
Indeed, he could use fish://name@hostname with konqueror, and a very neat protocol it is too, but fish:// isn't going to work until he has ssh sorted out. Which he hasn't. He doesn't even know if it is installed, or running, or configured properly.

We haven't even touched on security, public/private key encryption, passwordless authentication etc.
So, whilst your enthusiasm is laudable, one step at a time for newbies please.
Give the OP a break.

Last edited by tredegar; 05-08-2008 at 04:16 PM.
 
Old 05-08-2008, 06:30 PM   #14
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,242

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
Yeah, stick to basic ssh, its usually installed by default on most distros (if only to discourage use of telnet etc).
Good idea to start with a test file.
rsync is way overkill for a one time copy.
 
Old 05-09-2008, 08:46 AM   #15
borgibo
Member
 
Registered: Aug 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Here I am back !

I checked as informed and I have in both host (10.0.0.10) and receiver machine (10.0.0.14) ssh installed and running.

Both machines run Sidux, the host, everything installed in /root, the receiver has "/" plus "/home".

I gave the following command:

jv@siduxbox:~$ scp -r jv@10.0.0.10:/dev/hdb8/home/jv/miro /dev/hda14/home/jv/movies/miro
jv@10.0.0.10's password:
scp: /dev/hdb8/home/jv/miro: No such file or directory
jv@siduxbox:~$

The first line is the host machine or where the files are, the second is machine 10.0.0.14 from where I give the command and where I want the files copied to.

Am I doing something wrong? The path to the host file is correct. Early this morning though when I first tried the command I made a mistake in the path of the host defining the last part as: /movies/miro the correct being only /miro. Did this cause the problem ? I did reboot after that as I could not print my screen as well.


Many many thanks for your interest and persistance. I fail to answer more quickly as I get excausted trying to understand 'computer affairs' and react accordingly. I am sorry for that.


borgibo the illiterate.
 
  


Reply

Tags
between, computers, copy, two


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
Transferring files Denisius Slackware 6 10-27-2007 07:19 AM
Transferring files between boxes Kodiak_Claw Linux - Networking 5 12-17-2006 09:48 PM
transferring files to other disk.. bschiett Linux - Newbie 3 03-24-2005 07:04 PM
Transferring 40000+ files with FTP (mget) shows 0 files tim1235 Linux - Software 5 10-17-2004 06:06 PM
transferring files across a lan broxys Linux - Networking 2 06-23-2003 08:26 PM


All times are GMT -5. The time now is 07:35 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration