1 | .\" Copyright (c) 1983 Regents of the University of California.
|
---|
2 | .\" All rights reserved. The Berkeley software License Agreement
|
---|
3 | .\" specifies the terms and conditions for redistribution.
|
---|
4 | .\"
|
---|
5 | .\" @(#)rcp.1c 6.4 (Berkeley) 5/12/86
|
---|
6 | .\"
|
---|
7 | .TH RCP 1 "May 12, 1986"
|
---|
8 | .UC 5
|
---|
9 | .SH NAME
|
---|
10 | rcp \- remote file copy
|
---|
11 | .SH SYNOPSIS
|
---|
12 | .B rcp
|
---|
13 | .RB [ \-p ]
|
---|
14 | .I file1 file2
|
---|
15 | .br
|
---|
16 | .B rcp
|
---|
17 | .RB [ \-pr ]
|
---|
18 | .I file
|
---|
19 | \&...
|
---|
20 | .I directory
|
---|
21 | .SH DESCRIPTION
|
---|
22 | .B Rcp
|
---|
23 | copies files between machines. Each
|
---|
24 | .I file
|
---|
25 | or
|
---|
26 | .I directory
|
---|
27 | argument is either a remote file name of the
|
---|
28 | form ``rhost:path'', or a local file name (containing no `:' characters,
|
---|
29 | or a `/' before any `:'s).
|
---|
30 | .PP
|
---|
31 | If the
|
---|
32 | .B \-r
|
---|
33 | option
|
---|
34 | is specified and any of the source files are directories,
|
---|
35 | .B rcp
|
---|
36 | copies each subtree rooted at that name; in this case
|
---|
37 | the destination must be a directory.
|
---|
38 | .PP
|
---|
39 | By default, the mode and owner of
|
---|
40 | .I file2
|
---|
41 | are preserved if it already existed; otherwise the mode of the source file
|
---|
42 | modified by the
|
---|
43 | .BR umask (2)
|
---|
44 | on the destination host is used.
|
---|
45 | The
|
---|
46 | .B \-p
|
---|
47 | option causes
|
---|
48 | .B rcp
|
---|
49 | to attempt to preserve (duplicate) in its copies the modification
|
---|
50 | times and modes of the source files, ignoring the
|
---|
51 | .BR umask .
|
---|
52 | .PP
|
---|
53 | If
|
---|
54 | .I path
|
---|
55 | is not a full path name, it is interpreted relative to
|
---|
56 | your login directory on
|
---|
57 | .IR rhost .
|
---|
58 | A
|
---|
59 | .I path
|
---|
60 | on a remote host may be quoted (using \e, ", or \(aa)
|
---|
61 | so that the metacharacters are interpreted remotely.
|
---|
62 | .PP
|
---|
63 | .B Rcp
|
---|
64 | does not prompt for passwords; your current local user name
|
---|
65 | must exist on
|
---|
66 | .I rhost
|
---|
67 | and allow remote command execution via
|
---|
68 | .BR rsh (1).
|
---|
69 | .PP
|
---|
70 | .B Rcp
|
---|
71 | handles third party copies, where neither source nor target files
|
---|
72 | are on the current machine.
|
---|
73 | Hostnames may also take the form ``rname@rhost'' to use
|
---|
74 | .I rname
|
---|
75 | rather than the current user name on the remote host.
|
---|
76 | The destination hostname may also take the form ``rhost.rname'' to
|
---|
77 | support destination machines that are running 4.2BSD
|
---|
78 | versions of
|
---|
79 | .BR rcp .
|
---|
80 | .SH SEE ALSO
|
---|
81 | .BR cp (1),
|
---|
82 | .BR ftp (1),
|
---|
83 | .BR rsh (1),
|
---|
84 | .BR rlogin (1).
|
---|
85 | .SH BUGS
|
---|
86 | Doesn't detect all cases where the target of a copy might
|
---|
87 | be a file in cases where only a directory should be legal.
|
---|
88 | .br
|
---|
89 | Is confused by any output generated by commands in a
|
---|
90 | \&.profile, or \&.*shrc file on the remote host.
|
---|