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 10-01-2009, 01:03 PM   #1
Dominique1956
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
Copy files from machine1 to machine2


Hello,

I am trying to copy files from a machine1 to a machine2. I was looking at a thread of 2006 they were using nc but so far i could not find this command.

Any new command or other way to do the copy?

Thanks,
DOm
 
Old 10-01-2009, 01:10 PM   #2
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
How are the two machines connected? NFS, Cifs, etc.
 
Old 10-01-2009, 01:12 PM   #3
mirjeddi
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
Hi

Yes you can use scp,rsync commands to copy files from a machine1 to a machine2.
 
Old 10-01-2009, 01:15 PM   #4
sploot
Member
 
Registered: Sep 2009
Location: Phoenix, AZ
Distribution: Gentoo, Debian, Ubuntu
Posts: 121

Rep: Reputation: 27
they are connected by a router, yes?

turn sshd on for both the remote computer.

Code:
rsync -rvP user@remoteComputerIP:/where/your/file/is /where/you/want/it/to/go/
This should do it.

Or you could try scp, but scp won't recover from errors like rsync will, so I suggest rsync.

Also, read the man pages on rsync to get more info on options.

Good luck!
 
Old 10-01-2009, 01:18 PM   #5
ptrivino
Member
 
Registered: May 2008
Location: San Diego CA
Distribution: CentOS
Posts: 40

Rep: Reputation: 5
rsync is good for copying files

I have to copy files between servers all the time. If you need a bunch copied, use rsync:

rsync -avP --exclude="/proc" root@<server>:/ .

The above will copy all files from <server> to the current directory (the dot), excluding the /proc directory. Look at the man page for rsync to see what the "-avP" options do.
 
  


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
Creating a script to move or copy files into multiple directories below the files matthes138 Linux - Newbie 5 08-25-2009 04:57 PM
in copy files or ls files the command want to invert select some files how to?? hocheetiong Linux - Newbie 3 06-27-2008 06:32 AM
How to find files and copy the found files to the floppy in one command justmehere Linux - Newbie 11 05-04-2008 11:29 PM
Command to copy files/folders but skip bad/corrupt files?? leemoreau Linux - Newbie 2 04-02-2007 02:27 PM
Mepis, copy files to thumb drive, files deleted? vremenno Linux - Newbie 6 09-15-2006 11:21 PM

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

All times are GMT -5. The time now is 04:32 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