next up previous contents index
Next: Examples: Up: Remote File Access Previous: Examples:

rcp

 

The rcp (remote copy) command copies a file or directory from one host in the network into a directory or as a file on another host of that network:

 
               		  rcp [  -rp]   source destination

Remember that the hosts have to be authorised using the rhosts mechanism described earlier in this Chapter. The -r flag means source is a directory and is to be copied with all the files and subdirectories it contains. The -p flag preserves the modification time and access modes.

The source and destination specifications not only contain the name of the file but also optionally the host where it resides. You can specify source and destination in one of the following three forms:

 
 filename               		 relative or absolute name of local file

host: filename relative or absolute name of file residing on host

user@ host: filename name of file relative to the home directory of user on host.

If the filename is specified with a leading / then it is taken as absolute.





Alan Silverman
Wed Apr 12 16:54:02 METDST 1995