rcp(1C) rcp(1C)NAME rcp - copies files between two systems SYNOPSIS rcp file1 file2 rcp [-r] file... directory ARGUMENTS directory Specifies the directory into which the files will be copied. file Specifies the file that is to be copied into the given directory. file1 Specifies the file in the current directory that is to be copied into a remote directory. file2 Specifies the new file that was copied in the remote directory. -r Causes rcp to copy each subtree rooted at that name if any of the source files are directories; in this case, the destination host is used. DESCRIPTION rcp copies files between machines. Each file or directory argument is either a remote filename of the form rhost:path or a local filename (containing no : characters, or a / before a :). By default, the mode and owner of file2 are preserved if it already existed; otherwise the mode of the source file modified by the umask(2) on the destination host is used. If path is not a full pathname, it is interpreted relative to the login directory on rhost. A path on a remote host may be quoted (using \, ", or `) so that the metacharacters are interpreted remotely. rcp does not prompt for passwords; the current local user name must exist on rhost and allow remote command execution via remsh(1N). rcp handles third party copies, where neither source nor target files are on the current machine. Host names may also take the form rname@rhost to use rname rather than the current user name on the remote host. January 1992 1
rcp(1C) rcp(1C)EXAMPLES The command rcp recipe doc:cake copies the file recipe from the current directory and renames it as cake in the remote login directory on doc. The command rcp -r doc:Test . creates a new directory Test below the current (local) directory. The local Test contains copies of every file and subdirectory contained in the remote Test on the machine doc. Note that both examples assume that there is a login directory on doc and that permissions are set correctly. See the network issues appendix in A/UX Networking Essentials for more information. LIMITATIONS rcp doesn't detect all cases where the target of a copy might be a file when only a directory should be legal. rcp is confused by any output generated by commands in a .login, .profile, or .cshrc file on the remote host. FILES /usr/bin/rcp Executable file SEE ALSO cp(1), ftp(1N), remsh(1N), rlogin(1N) A/UX Networking Essentials 2 January 1992