rcp(1C) rcp(1C)NAME rcp - remote file copy SYNOPSIS rcp file1 file2 rcp [-r] file... directory 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 / be- fore a :). If the -r option is specified and any of the source files are directories, rcp copies each subtree rooted at that name; in this case the destination must be a directory. By default, the mode and owner of file2 are preserved if it already existed; otherwise the mode of the source file modi- fied 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. 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 April, 1990 1
rcp(1C) rcp(1C)directory on doc and that permissions are set correctly. See the section ``Network Permissions'' of ``Using B-NET'' in A/UX Communications User's Guide for more information. FILES /usr/bin/rcp SEE ALSO cp(1), ftp(1C), remsh(1N), rlogin(1N). ``Using B-NET'' in A/UX Communications User's Guide. BUGS 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. 2 April, 1990