IN THIS TASK
Summary
The remote copy (RCP) tool is a standard UNIX tool and a Microsoft Windows 2000 tool. You can use this tool to transfer a file and recursively transfer the whole directory between two computers.
Configuring the UNIX Host
Before you can use the RCP tool from a Windows-based computer, you must turn on the RCP service and update the security files to allow the Windows-based computer to connect to your computer over this service.
To turn on the RCP service by using inetd:-
Log on to the computer as root.
-
Edit the file /etc/Inetd.conf.
-
Uncomment the lines that start with shell and that start with exec.
-
Save the file.
-
Send the Host User Profile (HUP) signal to inetd by using kill or by using pkill. Use ps to determine the process ID.
-
Run inetd again.
To turn on the RCP service by using xinetd:
-
Log on to the computer as root.
-
Edit the file /etc/Xinetd.d/rsh.
-
Change the line disable to no.
-
Save the file.
-
Send the HUP signal to xinetd by using kill or by using pkill. Use ps to determine the process ID.
-
Run xinetd again.
You must now set the security permissions to allow the Windows host to connect to your computer:
-
Edit the file /etc/Hosts.equiv.
-
Add a line that contains the name of your Windows host.
-
Add a second line that contains the name of your Windows host and the name of a user who can access the directory that you want to transfer. Separate the two elements with a tab character.
-
Save the file.
NOTE: To transfer files from some UNIX computers, you must log on to the Windows-based computer as the user that you set in the file Hosts.equiv.
Transfer a Single File
To transfer a single file, you must supply the hostname, the username, the path of the source file, and the path of the destination file that you want the file copied to. For example, to copy the file Index.html from the path /usr/local/htdocs on the computer unixhost as the user webuser you must use:
rcp unixhost.webuser:/usr/local/htdocs/index.html index.html
Transfer a Whole Directory
To transfer a whole directory, which includes all of the directory contents and subdirectories, add the -r command line option to the command. For example, to copy the whole Htdocs directory from your UNIX computer to the directory C:\inetpub\unixweb you must use:
rcp -r unixhost.webuser:/usr/local/htdocs C:\InetPub\UnixWeb
References
For additional information about preparing to move data for a migration from UNIX to Windows, click the article number below to view the article in the Microsoft Knowledge Base:
324538 HOW TO: Migrate Web Site Data in a UNIX-to-Windows Migration