Initial import from FreeBSD RELENG_4:
[games.git] / bin / rcp / rcp.1
1 .\" Copyright (c) 1983, 1990, 1993
2 .\"     The Regents of the University of California.  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       8.1 (Berkeley) 5/31/93
33 .\" $FreeBSD: src/bin/rcp/rcp.1,v 1.9.2.6 2002/08/16 20:06:34 ume Exp $
34 .\"
35 .Dd May 31, 1993
36 .Dt RCP 1
37 .Os
38 .Sh NAME
39 .Nm rcp
40 .Nd remote file copy
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl 46Kpx
44 .Op Fl k Ar realm
45 .Ar file1 file2
46 .Nm
47 .Op Fl 46Kprx
48 .Op Fl k Ar realm
49 .Ar
50 .Ar directory
51 .Sh DESCRIPTION
52 The
53 .Nm
54 utility copies files between machines.  Each
55 .Ar file
56 or
57 .Ar directory
58 argument is either a remote file name of the
59 form
60 .Dq rname@rhost:path ,
61 or a local file name (containing no `:' characters,
62 or a `/' before any `:'s).
63 .Pp
64 The following options are available:
65 .Bl -tag -width indent
66 .It Fl 4
67 Use IPv4 addresses only.
68 .It Fl 6
69 Use IPv6 addresses only.
70 .It Fl K
71 Turn off all Kerberos authentication.
72 .It Fl k
73 Request
74 .Nm
75 to obtain tickets
76 for the remote host in realm
77 .Ar realm
78 instead of the remote host's realm as determined by
79 .Xr krb_realmofhost 3 .
80 .It Fl p
81 Cause
82 .Nm
83 to attempt to preserve (duplicate) in its copies the modification
84 times and modes of the source files, ignoring the
85 .Ar umask  .
86 By default, the mode and owner of
87 .Ar file2
88 are preserved if it already existed; otherwise the mode of the source file
89 modified by the
90 .Xr umask  2
91 on the destination host is used.
92 .It Fl r
93 If any of the source files are directories,
94 .Nm
95 copies each subtree rooted at that name; in this case
96 the destination must be a directory.
97 .It Fl x
98 Turn on
99 .Tn DES
100 encryption for all data passed by
101 .Nm .
102 This may impact response time and
103 .Tn CPU
104 utilization, but provides
105 increased security.
106 .El
107 .Pp
108 If
109 .Ar path
110 is not a full path name, it is interpreted relative to
111 the login directory of the specified user
112 .Ar ruser
113 on
114 .Ar rhost  ,
115 or your current user name if no other remote user name is specified.
116 A
117 .Ar path
118 on a remote host may be quoted (using \e, ", or \(aa)
119 so that the metacharacters are interpreted remotely.
120 .Pp
121 The
122 .Nm
123 utility does not prompt for passwords; it performs remote execution
124 via
125 .Xr rsh  1  ,
126 and requires the same authorization.
127 .Pp
128 The
129 .Nm
130 utility handles third party copies, where neither source nor target files
131 are on the current machine.
132 .Sh FILES
133 .Bl -tag -width /etc/auth.conf -compact
134 .It Pa /etc/auth.conf
135 configure authentication services
136 .El
137 .Sh SEE ALSO
138 .Xr cp 1 ,
139 .Xr ftp 1 ,
140 .Xr rlogin 1 ,
141 .Xr rsh 1 ,
142 .Xr auth.conf 5 ,
143 .Xr hosts.equiv 5
144 .Sh HISTORY
145 The
146 .Nm
147 command appeared in
148 .Bx 4.2 .
149 The version of
150 .Nm
151 described here
152 has been reimplemented with Kerberos in
153 .Bx 4.3 Reno .
154 .Sh BUGS
155 Doesn't detect all cases where the target of a copy might
156 be a file in cases where only a directory should be legal.
157 .Pp
158 Is confused by any output generated by commands in a
159 .Pa \&.login ,
160 .Pa \&.profile ,
161 or
162 .Pa \&.cshrc
163 file on the remote host.
164 .Pp
165 The destination user and hostname may have to be specified as
166 .Dq rhost.rname
167 when the destination machine is running the
168 .Bx 4.2
169 version of
170 .Nm .