Merge branch 'vendor/TNFTP'
[dragonfly.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. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)rcp.1       8.1 (Berkeley) 5/31/93
29 .\" $FreeBSD: src/bin/rcp/rcp.1,v 1.9.2.6 2002/08/16 20:06:34 ume Exp $
30 .\" $DragonFly: src/bin/rcp/rcp.1,v 1.2 2003/06/17 04:22:50 dillon Exp $
31 .\"
32 .Dd May 31, 1993
33 .Dt RCP 1
34 .Os
35 .Sh NAME
36 .Nm rcp
37 .Nd remote file copy
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl 46Kpx
41 .Op Fl k Ar realm
42 .Ar file1 file2
43 .Nm
44 .Op Fl 46Kprx
45 .Op Fl k Ar realm
46 .Ar
47 .Ar directory
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility copies files between machines.  Each
52 .Ar file
53 or
54 .Ar directory
55 argument is either a remote file name of the
56 form
57 .Dq rname@rhost:path ,
58 or a local file name (containing no `:' characters,
59 or a `/' before any `:'s).
60 .Pp
61 The following options are available:
62 .Bl -tag -width indent
63 .It Fl 4
64 Use IPv4 addresses only.
65 .It Fl 6
66 Use IPv6 addresses only.
67 .It Fl K
68 Turn off all Kerberos authentication.
69 .It Fl k
70 Request
71 .Nm
72 to obtain tickets
73 for the remote host in realm
74 .Ar realm
75 instead of the remote host's realm as determined by
76 .Xr krb_realmofhost 3 .
77 .It Fl p
78 Cause
79 .Nm
80 to attempt to preserve (duplicate) in its copies the modification
81 times and modes of the source files, ignoring the
82 .Ar umask  .
83 By default, the mode and owner of
84 .Ar file2
85 are preserved if it already existed; otherwise the mode of the source file
86 modified by the
87 .Xr umask  2
88 on the destination host is used.
89 .It Fl r
90 If any of the source files are directories,
91 .Nm
92 copies each subtree rooted at that name; in this case
93 the destination must be a directory.
94 .It Fl x
95 Turn on
96 .Tn DES
97 encryption for all data passed by
98 .Nm .
99 This may impact response time and
100 .Tn CPU
101 utilization, but provides
102 increased security.
103 .El
104 .Pp
105 If
106 .Ar path
107 is not a full path name, it is interpreted relative to
108 the login directory of the specified user
109 .Ar ruser
110 on
111 .Ar rhost  ,
112 or your current user name if no other remote user name is specified.
113 A
114 .Ar path
115 on a remote host may be quoted (using \e, ", or \(aa)
116 so that the metacharacters are interpreted remotely.
117 .Pp
118 The
119 .Nm
120 utility does not prompt for passwords; it performs remote execution
121 via
122 .Xr rsh  1  ,
123 and requires the same authorization.
124 .Pp
125 The
126 .Nm
127 utility handles third party copies, where neither source nor target files
128 are on the current machine.
129 .Sh FILES
130 .Bl -tag -width /etc/auth.conf -compact
131 .It Pa /etc/auth.conf
132 configure authentication services
133 .El
134 .Sh SEE ALSO
135 .Xr cp 1 ,
136 .Xr ftp 1 ,
137 .Xr rlogin 1 ,
138 .Xr rsh 1 ,
139 .Xr auth.conf 5 ,
140 .Xr hosts.equiv 5
141 .Sh HISTORY
142 The
143 .Nm
144 command appeared in
145 .Bx 4.2 .
146 The version of
147 .Nm
148 described here
149 has been reimplemented with Kerberos in
150 .Bx 4.3 Reno .
151 .Sh BUGS
152 Doesn't detect all cases where the target of a copy might
153 be a file in cases where only a directory should be legal.
154 .Pp
155 Is confused by any output generated by commands in a
156 .Pa \&.login ,
157 .Pa \&.profile ,
158 or
159 .Pa \&.cshrc
160 file on the remote host.
161 .Pp
162 The destination user and hostname may have to be specified as
163 .Dq rhost.rname
164 when the destination machine is running the
165 .Bx 4.2
166 version of
167 .Nm .