RCP(1C) — Unix Programmer’s Manual
NAME
rcp − remote file copy
SYNOPSIS
rcp [ −p ] file1 file2
rcp [ −p ] [ −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 ‘/’ before any ‘:’s).
By default, rcp preserves the mode and owner of file2 if file2 already existed. Otherwise rcp uses the mode of the source file modified by the umask(2) on the destination host.
If path is not a full path name, rcp interprets it relative to your login directory on rhost. You can quote path on a remote host (using \, ", or ´) so that the metacharacters are interpreted remotely.
Rcp does not prompt for passwords. Your current local user name must exist on rhost and allow remote command execution via rsh(1C).
Rcp handles third party copies, where neither source nor target files are on the current machine. Hostnames may also take the form “rname@rhost” to use rname rather than the current user name on the remote host. The destination hostname may also take the form “rhost.rname” to support destination machines that are running 4.2BSD versions of rcp.
OPTIONS
−p Causes rcp to attempt to preserve (duplicate) in its copies the modification times and modes of the source files, ignoring the umask.
−r If any of the specified source files are directories, copies each subtree rooted at that name. If you uses −r, the destination of the copy must be a directory.
SEE ALSO
cp(1), ftp(1C), rsh(1C), rlogin(1C)
BUGS
Rcp does not detect all cases where the target of a copy might be a file in cases where 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.
5 BSD — May 12, 1986