]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - bin/rcp/rcp.1
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / bin / rcp / rcp.1
1 .\"-
2 .\" Copyright (c) 1983, 1990, 1993
3 .\"     The Regents of the University of California.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 4. Neither the name of the University nor the names of its contributors
14 .\"    may be used to endorse or promote products derived from this software
15 .\"    without specific prior written permission.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" SUCH DAMAGE.
28 .\"
29 .\"     @(#)rcp.1       8.1 (Berkeley) 5/31/93
30 .\" $FreeBSD$
31 .\"
32 .Dd October 16, 2002
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 46p
41 .Ar file1 file2
42 .Nm
43 .Op Fl 46pr
44 .Ar
45 .Ar directory
46 .Sh DESCRIPTION
47 The
48 .Nm
49 utility copies files between machines.
50 Each
51 .Ar file
52 or
53 .Ar directory
54 argument is either a remote file name of the
55 form
56 .Dq ruser@rhost:path ,
57 or a local file name (containing no
58 .Ql :\&
59 characters,
60 or a
61 .Ql /
62 before any
63 .Ql :\& Ns
64 s).
65 .Pp
66 The following options are available:
67 .Bl -tag -width indent
68 .It Fl 4
69 Use IPv4 addresses only.
70 .It Fl 6
71 Use IPv6 addresses only.
72 .It Fl p
73 Cause
74 .Nm
75 to attempt to preserve (duplicate) in its copies the modification
76 times and modes of the source files, ignoring the
77 .Xr umask 2 .
78 By default, the mode and owner of
79 .Ar file2
80 are preserved if it already existed; otherwise the mode of the source file
81 modified by the
82 .Xr umask 2
83 on the destination host is used.
84 .It Fl r
85 If any of the source files are directories,
86 .Nm
87 copies each subtree rooted at that name; in this case
88 the destination must be a directory.
89 .El
90 .Pp
91 If
92 .Ar path
93 is not a full path name, it is interpreted relative to
94 the login directory of the specified user
95 .Ar ruser
96 on
97 .Ar rhost ,
98 or your current user name if no other remote user name is specified.
99 A
100 .Ar path
101 on a remote host may be quoted (using
102 .Ql \e ,
103 .Ql \&" ,
104 or
105 .Ql \(aa )
106 so that the metacharacters are interpreted remotely.
107 .Pp
108 The
109 .Nm
110 utility does not prompt for passwords; it performs remote execution
111 via
112 .Xr rsh 1 ,
113 and requires the same authorization.
114 .Pp
115 The
116 .Nm
117 utility handles third party copies, where neither source nor target files
118 are on the current machine.
119 .Sh SEE ALSO
120 .Xr cp 1 ,
121 .Xr ftp 1 ,
122 .Xr rlogin 1 ,
123 .Xr rsh 1 ,
124 .Xr hosts.equiv 5
125 .Sh HISTORY
126 The
127 .Nm
128 command appeared in
129 .Bx 4.2 .
130 The version of
131 .Nm
132 described here
133 has been reimplemented with Kerberos in
134 .Bx 4.3 Reno .
135 .Sh BUGS
136 Does not detect all cases where the target of a copy might
137 be a file in cases where only a directory should be legal.
138 .Pp
139 Is confused by any output generated by commands in a
140 .Pa .login ,
141 .Pa .profile ,
142 or
143 .Pa .cshrc
144 file on the remote host.
145 .Pp
146 The destination user and hostname may have to be specified as
147 .Dq rhost.ruser
148 when the destination machine is running the
149 .Bx 4.2
150 version of
151 .Nm .