]> git.saurik.com Git - apple/network_cmds.git/blob - rcp.tproj/rcp.1
network_cmds-77.tar.gz
[apple/network_cmds.git] / rcp.tproj / 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 .\"
34 .Dd May 31, 1993
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 Kpx
43 .Op Fl k Ar realm
44 .Ar file1 file2
45 .Nm rcp
46 .Op Fl Kprx
47 .Op Fl k Ar realm
48 .Ar file ...
49 .Ar directory
50 .Sh DESCRIPTION
51 .Nm Rcp
52 copies files between machines. Each
53 .Ar file
54 or
55 .Ar directory
56 argument is either a remote file name of the
57 form ``rname@rhost:path'', or a local file name (containing no `:' characters,
58 or a `/' before any `:'s).
59 .Pp
60 .Bl -tag -width flag
61 .It Fl K
62 The
63 .Fl K
64 option turns off all Kerberos authentication.
65 .It Fl k
66 The
67 .Fl k
68 option requests
69 .Nm rcp
70 to obtain tickets
71 for the remote host in realm
72 .Ar realm
73 instead of the remote host's realm as determined by
74 .Xr krb_realmofhost 3 .
75 .It Fl p
76 The
77 .Fl p
78 option causes
79 .Nm rcp
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 rcp
92 copies each subtree rooted at that name; in this case
93 the destination must be a directory.
94 .It Fl x
95 The
96 .Fl x
97 option turns on
98 .Tn DES
99 encryption for all data passed by
100 .Nm rcp .
101 This may impact response time and
102 .Tn CPU
103 utilization, but provides
104 increased security.
105 .El
106 .Pp
107 If
108 .Ar path
109 is not a full path name, it is interpreted relative to
110 the login directory of the specified user
111 .Ar ruser
112 on
113 .Ar rhost ,
114 or your current user name if no other remote user name is specified.
115 A
116 .Ar path
117 on a remote host may be quoted (using \e, ", or \(aa)
118 so that the metacharacters are interpreted remotely.
119 .Pp
120 .Nm Rcp
121 does not prompt for passwords; it performs remote execution
122 via
123 .Xr rsh 1 ,
124 and requires the same authorization.
125 .Pp
126 .Nm Rcp
127 handles third party copies, where neither source nor target files
128 are on the current machine.
129 .Sh SEE ALSO
130 .Xr cp 1 ,
131 .Xr ftp 1 ,
132 .Xr rsh 1 ,
133 .Xr rlogin 1
134 .Sh HISTORY
135 The
136 .Nm rcp
137 command appeared in
138 .Bx 4.2 .
139 The version of
140 .Nm rcp
141 described here
142 has been reimplemented with Kerberos in
143 .Bx 4.3 Reno .
144 .Sh BUGS
145 Doesn't detect all cases where the target of a copy might
146 be a file in cases where only a directory should be legal.
147 .Pp
148 Is confused by any output generated by commands in a
149 .Pa \&.login ,
150 .Pa \&.profile ,
151 or
152 .Pa \&.cshrc
153 file on the remote host.
154 .Pp
155 The destination user and hostname may have to be specified as
156 ``rhost.rname'' when the destination machine is running the
157 .Bx 4.2
158 version of
159 .Nm rcp .