]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - bin/rcp/rcp.1
MFC r320644:
[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 July 3, 2017
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 DEPRECATION NOTICE
47 .Nm
48 is deprecated and will be removed from future versions of the
49 .Fx
50 base system.
51 If
52 .Nm
53 is still required, it can be installed from ports or packages
54 (net/bsdrcmds).
55 .Sh DESCRIPTION
56 The
57 .Nm
58 utility copies files between machines.
59 Each
60 .Ar file
61 or
62 .Ar directory
63 argument is either a remote file name of the
64 form
65 .Dq ruser@rhost:path ,
66 or a local file name (containing no
67 .Ql :\&
68 characters,
69 or a
70 .Ql /
71 before any
72 .Ql :\& Ns
73 s).
74 .Pp
75 The following options are available:
76 .Bl -tag -width indent
77 .It Fl 4
78 Use IPv4 addresses only.
79 .It Fl 6
80 Use IPv6 addresses only.
81 .It Fl p
82 Cause
83 .Nm
84 to attempt to preserve (duplicate) in its copies the modification
85 times and modes of the source files, ignoring the
86 .Xr umask 2 .
87 By default, the mode and owner of
88 .Ar file2
89 are preserved if it already existed; otherwise the mode of the source file
90 modified by the
91 .Xr umask 2
92 on the destination host is used.
93 .It Fl r
94 If any of the source files are directories,
95 .Nm
96 copies each subtree rooted at that name; in this case
97 the destination must be a directory.
98 .El
99 .Pp
100 If
101 .Ar path
102 is not a full path name, it is interpreted relative to
103 the login directory of the specified user
104 .Ar ruser
105 on
106 .Ar rhost ,
107 or your current user name if no other remote user name is specified.
108 A
109 .Ar path
110 on a remote host may be quoted (using
111 .Ql \e ,
112 .Ql \&" ,
113 or
114 .Ql \(aa )
115 so that the metacharacters are interpreted remotely.
116 .Pp
117 The
118 .Nm
119 utility does not prompt for passwords; it performs remote execution
120 via
121 .Xr rsh 1 ,
122 and requires the same authorization.
123 .Pp
124 The
125 .Nm
126 utility handles third party copies, where neither source nor target files
127 are on the current machine.
128 .Sh SEE ALSO
129 .Xr cp 1 ,
130 .Xr ftp 1 ,
131 .Xr rlogin 1 ,
132 .Xr rsh 1 ,
133 .Xr hosts.equiv 5
134 .Sh HISTORY
135 The
136 .Nm
137 command appeared in
138 .Bx 4.2 .
139 The version of
140 .Nm
141 described here
142 has been reimplemented with Kerberos in
143 .Bx 4.3 Reno .
144 .Sh BUGS
145 Does not 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 .Dq rhost.ruser
157 when the destination machine is running the
158 .Bx 4.2
159 version of
160 .Nm .