Start development on 386BSD 0.0
[unix-history] / .ref-BSD-4_3_Net_2 / usr / src / bin / rcp / rcp.1
CommitLineData
b5dc1377 1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
ebb479fc 2.\" All rights reserved.
3b46468b 3.\"
af359dea
C
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.
3b46468b 19.\"
af359dea
C
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.
ebb479fc 31.\"
af359dea
C
32.\" @(#)rcp.1 6.14.1.1 (Berkeley) 8/20/91
33.\"
34.Dd August 20, 1991
b5dc1377 35.Dt RCP 1
af359dea 36.Os BSD 4.3r
b5dc1377
CL
37.Sh NAME
38.Nm rcp
39.Nd remote file copy
40.Sh SYNOPSIS
41.Nm rcp
1c15e888 42.Op Fl p
b5dc1377
CL
43.Op Fl k Ar realm
44.Ar file1 file2
45.Nm rcp
1c15e888 46.Op Fl p
b5dc1377
CL
47.Op Fl r
48.Op Fl k Ar realm
49.Ar file ...
50.Ar directory
51.Sh DESCRIPTION
52.Nm Rcp
3b46468b 53copies files between machines. Each
b5dc1377 54.Ar file
3b46468b 55or
b5dc1377 56.Ar directory
3b46468b 57argument is either a remote file name of the
2d1955f2 58form ``rname@rhost:path'', or a local file name (containing no `:' characters,
c33a908d 59or a `/' before any `:'s).
b5dc1377 60.Pp
af359dea
C
61.Bl -tag -width flag
62.It Fl r
b5dc1377
CL
63If any of the source files are directories,
64.Nm rcp
3b46468b
KM
65copies each subtree rooted at that name; in this case
66the destination must be a directory.
af359dea 67.It Fl p
ec6dcb7a 68The
b5dc1377 69.Fl p
ec6dcb7a 70option causes
b5dc1377 71.Nm rcp
ec6dcb7a
JL
72to attempt to preserve (duplicate) in its copies the modification
73times and modes of the source files, ignoring the
b5dc1377
CL
74.Ar umask .
75By default, the mode and owner of
76.Ar file2
77are preserved if it already existed; otherwise the mode of the source file
78modified by the
79.Xr umask 2
80on the destination host is used.
af359dea 81.It Fl k
2d1955f2 82The
b5dc1377 83.Fl k
2d1955f2 84option requests
b5dc1377 85.Nm rcp
2d1955f2
KF
86to obtain tickets
87for the remote host in realm
b5dc1377 88.Ar realm
2d1955f2 89instead of the remote host's realm as determined by
b5dc1377 90.Xr krb_realmofhost 3 .
af359dea 91.El
b5dc1377 92.Pp
3b46468b 93If
b5dc1377 94.Ar path
3b46468b 95is not a full path name, it is interpreted relative to
2d1955f2 96the login directory of the specified user
b5dc1377
CL
97.Ar ruser
98on
99.Ar rhost ,
2d1955f2 100or your current user name if no other remote user name is specified.
b5dc1377
CL
101A
102.Ar path
3b46468b
KM
103on a remote host may be quoted (using \e, ", or \(aa)
104so that the metacharacters are interpreted remotely.
b5dc1377
CL
105.Pp
106.Nm Rcp
2d1955f2
KF
107does not prompt for passwords; it performs remote execution
108via
b5dc1377 109.Xr rsh 1 ,
2d1955f2 110and requires the same authorization.
b5dc1377
CL
111.Pp
112.Nm Rcp
3b46468b
KM
113handles third party copies, where neither source nor target files
114are on the current machine.
b5dc1377
CL
115.Sh SEE ALSO
116.Xr cp 1 ,
117.Xr ftp 1 ,
118.Xr rsh 1 ,
119.Xr rlogin 1
120.Sh HISTORY
af359dea
C
121The
122.Nm rcp
123command appeared in
124.Bx 4.2 .
125The version of
126.Nm rcp
127described here
128has been reimplemented with Kerberos in
129.Bx 4.3 Reno .
b5dc1377 130.Sh BUGS
3b46468b
KM
131Doesn't detect all cases where the target of a copy might
132be a file in cases where only a directory should be legal.
b5dc1377 133.Pp
3b46468b 134Is confused by any output generated by commands in a
b5dc1377
CL
135.Pa \&.login ,
136.Pa \&.profile ,
137or
138.Pa \&.cshrc
139file on the remote host.
140.Pp
891645ee 141The destination user and hostname may have to be specified as
af359dea
C
142``rhost.rname'' when the destination machine is running the
143.Bx 4.2
b5dc1377
CL
144version of
145.Nm rcp .