BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / rcp.0
RCP(1C) UNIX Programmer's Manual RCP(1C)
N\bNA\bAM\bME\bE
rcp - remote file copy
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
r\brc\bcp\bp [ -\b-p\bp ] file1 file2
r\brc\bcp\bp [ -\b-p\bp ] [ -\b-r\br ] file ... directory
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bR_\bc_\bp copies files between machines. Each _\bf_\bi_\bl_\be or _\bd_\bi_\br_\be_\bc_\bt_\bo_\br_\by
argument is either a remote file name of the form
``rhost:path'', or a local file name (containing no `:'
characters, or a `/' before any `:'s).
If the -\b-r\br option is specified and any of the source files
are directories, _\br_\bc_\bp copies each subtree rooted at that
name; in this case the destination must be a directory.
By default, the mode and owner of _\bf_\bi_\bl_\be_\b2 are preserved if it
already existed; otherwise the mode of the source file modi-
fied by the _\bu_\bm_\ba_\bs_\bk(2) on the destination host is used. The
-\b-p\bp option causes _\br_\bc_\bp to attempt to preserve (duplicate) in
its copies the modification times and modes of the source
files, ignoring the _\bu_\bm_\ba_\bs_\bk.
If _\bp_\ba_\bt_\bh is not a full path name, it is interpreted relative
to your login directory on _\br_\bh_\bo_\bs_\bt. A _\bp_\ba_\bt_\bh on a remote host
may be quoted (using \, ", or ') so that the metacharacters
are interpreted remotely.
_\bR_\bc_\bp does not prompt for passwords; your current local user
name must exist on _\br_\bh_\bo_\bs_\bt and allow remote command execution
via _\br_\bs_\bh(1C).
_\bR_\bc_\bp 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 _\br_\bn_\ba_\bm_\be rather than the
current user name on the remote host.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
cp(1), ftp(1C), rsh(1C), rlogin(1C)
B\bBU\bUG\bGS\bS
Doesn't detect all cases where the target of a copy might be
a file in cases where only a directory should be legal.
Is confused by any output generated by commands in a .login,
.profile, or .cshrc file on the remote host.
The destination user and hostname may have to be specified
as ``rhost.rname'' when the destination machine is running
the 4.2BSD version of _\br_\bc_\bp.
Printed 7/9/88 September 16, 1987 1
RCP(1C) UNIX Programmer's Manual RCP(1C)
Printed 7/9/88 September 16, 1987 2