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