Commit | Line | Data |
---|---|---|
7b089094 WJ |
1 | .\" Copyright (c) 1983, 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
32 | .\" @(#)rcp.1 6.14 (Berkeley) 7/27/91 | |
33 | .\" | |
34 | .Dd July 27, 1991 | |
35 | .Dt RCP 1 | |
36 | .Os BSD 4.3r | |
37 | .Sh NAME | |
38 | .Nm rcp | |
39 | .Nd remote file copy | |
40 | .Sh SYNOPSIS | |
41 | .Nm rcp | |
42 | .Op Fl px | |
43 | .Op Fl k Ar realm | |
44 | .Ar file1 file2 | |
45 | .Nm rcp | |
46 | .Op Fl px | |
47 | .Op Fl r | |
48 | .Op Fl k Ar realm | |
49 | .Ar file ... | |
50 | .Ar directory | |
51 | .Sh DESCRIPTION | |
52 | .Nm Rcp | |
53 | copies files between machines. Each | |
54 | .Ar file | |
55 | or | |
56 | .Ar directory | |
57 | argument is either a remote file name of the | |
58 | form ``rname@rhost:path'', or a local file name (containing no `:' characters, | |
59 | or a `/' before any `:'s). | |
60 | .Pp | |
61 | .Bl -tag -width flag | |
62 | .It Fl r | |
63 | If any of the source files are directories, | |
64 | .Nm rcp | |
65 | copies each subtree rooted at that name; in this case | |
66 | the destination must be a directory. | |
67 | .It Fl p | |
68 | The | |
69 | .Fl p | |
70 | option causes | |
71 | .Nm rcp | |
72 | to attempt to preserve (duplicate) in its copies the modification | |
73 | times and modes of the source files, ignoring the | |
74 | .Ar umask . | |
75 | By default, the mode and owner of | |
76 | .Ar file2 | |
77 | are preserved if it already existed; otherwise the mode of the source file | |
78 | modified by the | |
79 | .Xr umask 2 | |
80 | on the destination host is used. | |
81 | .It Fl k | |
82 | The | |
83 | .Fl k | |
84 | option requests | |
85 | .Nm rcp | |
86 | to obtain tickets | |
87 | for the remote host in realm | |
88 | .Ar realm | |
89 | instead of the remote host's realm as determined by | |
90 | .Xr krb_realmofhost 3 . | |
91 | .It Fl x | |
92 | The | |
93 | .Fl x | |
94 | option turns on | |
95 | .Tn DES | |
96 | encryption for all data passed by | |
97 | .Nm rcp . | |
98 | This may impact response time and | |
99 | .Tn CPU | |
100 | utilization, but provides | |
101 | increased security. | |
102 | .El | |
103 | .Pp | |
104 | If | |
105 | .Ar path | |
106 | is not a full path name, it is interpreted relative to | |
107 | the login directory of the specified user | |
108 | .Ar ruser | |
109 | on | |
110 | .Ar rhost , | |
111 | or your current user name if no other remote user name is specified. | |
112 | A | |
113 | .Ar path | |
114 | on a remote host may be quoted (using \e, ", or \(aa) | |
115 | so that the metacharacters are interpreted remotely. | |
116 | .Pp | |
117 | .Nm Rcp | |
118 | does not prompt for passwords; it performs remote execution | |
119 | via | |
120 | .Xr rsh 1 , | |
121 | and requires the same authorization. | |
122 | .Pp | |
123 | .Nm Rcp | |
124 | handles third party copies, where neither source nor target files | |
125 | are on the current machine. | |
126 | .Sh SEE ALSO | |
127 | .Xr cp 1 , | |
128 | .Xr ftp 1 , | |
129 | .Xr rsh 1 , | |
130 | .Xr rlogin 1 | |
131 | .Sh HISTORY | |
132 | The | |
133 | .Nm rcp | |
134 | command appeared in | |
135 | .Bx 4.2 . | |
136 | The version of | |
137 | .Nm rcp | |
138 | described here | |
139 | has been reimplemented with Kerberos in | |
140 | .Bx 4.3 Reno . | |
141 | .Sh BUGS | |
142 | Doesn't detect all cases where the target of a copy might | |
143 | be a file in cases where only a directory should be legal. | |
144 | .Pp | |
145 | Is confused by any output generated by commands in a | |
146 | .Pa \&.login , | |
147 | .Pa \&.profile , | |
148 | or | |
149 | .Pa \&.cshrc | |
150 | file on the remote host. | |
151 | .Pp | |
152 | The destination user and hostname may have to be specified as | |
153 | ``rhost.rname'' when the destination machine is running the | |
154 | .Bx 4.2 | |
155 | version of | |
156 | .Nm rcp . |