Operating System - Microsoft
1752664 Members
5694 Online
108788 Solutions
New Discussion юеВ

How to rcp file from windows to linux

 
SOLVED
Go to solution
hangyu
Regular Advisor

How to rcp file from windows to linux

If I want to copy file (test.txt) from host : 192.168.0.1 to another host 192.168.0.2 , what is the command ?

I tried rcp -a 192.168.0.1.myname:test.txt 192.168.0.2.myname:\tmp but not work , can advise how to do it ? thx



RCP [-a | -b] [-h] [-r] [host][.user:]source [host][.user:] path\destination
4 REPLIES 4
Richard Darling
Trusted Contributor
Solution

Re: How to rcp file from windows to linux

Use ftp from LINUX to Windows if you don't have some flavor of SAMBA installed.
Example:
Start -> run -> cmd
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\rdarling>ftp 192.100.100.199
Connected to 192.100.100.199.
220 L1000 FTP server (Version 1.1.214.8 Fri Apr 20 07:27:42 GMT 2001) ready.
User (192.100.100.199:(none)): root
331 Password required for root.
Password:
230 User root logged in.
ftp> cd /tmp
250 CWD command successful.
ftp> get tztab
200 PORT command successful.
150 Opening ASCII mode data connection for tztab (11935 bytes).
226 Transfer complete.
ftp: 12333 bytes received in 0.00Seconds 12333000.00Kbytes/sec.

tztab file is in C:\Documents and Settings\rdarling

Even easier if you get a GIU ftp program, such as FTP Voyager.
RD
rdarling@southwickclothing.com
Ivan Ferreira
Honored Contributor

Re: How to rcp file from windows to linux

The rcp command provided by windows is not compatible with the "rcp" service of Linux. You may need to install cygwin, or as methioned above, use SAMBA or ftp.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Andrew Cowan
Honored Contributor

Re: How to rcp file from windows to linux

hangyu,

You are better off using the secure alternative Putty/SSH. Download the programs from this link:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

They don't need any installation, just copying to the drive, though you can add the directory to your $PATH for extra convenience. There are then two alternatives:

pscp file user@host:/path/file

and

psftp hostname

The second is better for sending multiple files, the first is more direct and can be scripted and automated.
pasquino bocci_1
Trusted Contributor

Re: How to rcp file from windows to linux

Hi,

never tried WINSCP?
I think it's the best one!!!
Pasquino