The rcp command provides an alternative to ftp; it allows users to copy files over the network. The rcp command is the remote version of the Unix cp (copy) command. When using the rcp command, you do not need to supply a user ID or password; this might be considered a security hole. However, a level of security is provided by the fact that the name of your computer must reside in either of two server-based files named rhosts and hosts.equiv. The rcp command allows a user to copy files between a local computer and the host server or between two remote computers. The syntax for the rcp command is rcp [hostname1]:filename1 [hostname2]:filename2
The following are three examples using the rcp command. This example copies a file from the remote Unix computer to the local host: rcp server3.corporate.earthquakes.txt earthquakes.txt This example copies a file from the local host to a remote computer: rcp earthquakes.txt server3.corporate.earthquakes.txt You can also use rcp to copy a file from one remote host to another remote host. See Hour 15, "Remote Access Utilities," for more on rcp and other remote access options. |