xref: /original-bsd/bin/rcp/rcp.1 (revision ca98dac2)
1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"	@(#)rcp.1	6.16 (Berkeley) 06/20/92
7.\"
8.Dd
9.Dt RCP 1
10.Os BSD 4.3r
11.Sh NAME
12.Nm rcp
13.Nd remote file copy
14.Sh SYNOPSIS
15.Nm rcp
16.Op Fl Kpx
17.Op Fl k Ar realm
18.Ar file1 file2
19.Nm rcp
20.Op Fl Kprx
21.Op Fl k Ar realm
22.Ar file ...
23.Ar directory
24.Sh DESCRIPTION
25.Nm Rcp
26copies files between machines.  Each
27.Ar file
28or
29.Ar directory
30argument is either a remote file name of the
31form ``rname@rhost:path'', or a local file name (containing no `:' characters,
32or a `/' before any `:'s).
33.Pp
34.Bl -tag -width flag
35.It Fl K
36The
37.Fl K
38option turns off all Kerberos authentication.
39.It Fl k
40The
41.Fl k
42option requests
43.Nm rcp
44to obtain tickets
45for the remote host in realm
46.Ar realm
47instead of the remote host's realm as determined by
48.Xr krb_realmofhost  3  .
49.It Fl p
50The
51.Fl p
52option causes
53.Nm rcp
54to attempt to preserve (duplicate) in its copies the modification
55times and modes of the source files, ignoring the
56.Ar umask  .
57By default, the mode and owner of
58.Ar file2
59are preserved if it already existed; otherwise the mode of the source file
60modified by the
61.Xr umask  2
62on the destination host is used.
63.It Fl r
64If any of the source files are directories,
65.Nm rcp
66copies each subtree rooted at that name; in this case
67the destination must be a directory.
68.It Fl x
69The
70.Fl x
71option turns on
72.Tn DES
73encryption for all data passed by
74.Nm rcp .
75This may impact response time and
76.Tn CPU
77utilization, but provides
78increased security.
79.El
80.Pp
81If
82.Ar path
83is not a full path name, it is interpreted relative to
84the login directory of the specified user
85.Ar ruser
86on
87.Ar rhost  ,
88or your current user name if no other remote user name is specified.
89A
90.Ar path
91on a remote host may be quoted (using \e, ", or \(aa)
92so that the metacharacters are interpreted remotely.
93.Pp
94.Nm Rcp
95does not prompt for passwords; it performs remote execution
96via
97.Xr rsh  1  ,
98and requires the same authorization.
99.Pp
100.Nm Rcp
101handles third party copies, where neither source nor target files
102are on the current machine.
103.Sh SEE ALSO
104.Xr cp 1 ,
105.Xr ftp 1 ,
106.Xr rsh 1 ,
107.Xr rlogin 1
108.Sh HISTORY
109The
110.Nm rcp
111command appeared in
112.Bx 4.2 .
113The version of
114.Nm rcp
115described here
116has been reimplemented with Kerberos in
117.Bx 4.3 Reno .
118.Sh BUGS
119Doesn't detect all cases where the target of a copy might
120be a file in cases where only a directory should be legal.
121.Pp
122Is confused by any output generated by commands in a
123.Pa \&.login ,
124.Pa \&.profile ,
125or
126.Pa \&.cshrc
127file on the remote host.
128.Pp
129The destination user and hostname may have to be specified as
130``rhost.rname'' when the destination machine is running the
131.Bx 4.2
132version of
133.Nm rcp  .
134