xref: /original-bsd/bin/rcp/rcp.1 (revision e59fb703)
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.14.1.1 (Berkeley) 08/20/91
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 p
17.Op Fl k Ar realm
18.Ar file1 file2
19.Nm rcp
20.Op Fl p
21.Op Fl r
22.Op Fl k Ar realm
23.Ar file ...
24.Ar directory
25.Sh DESCRIPTION
26.Nm Rcp
27copies files between machines.  Each
28.Ar file
29or
30.Ar directory
31argument is either a remote file name of the
32form ``rname@rhost:path'', or a local file name (containing no `:' characters,
33or a `/' before any `:'s).
34.Pp
35.Bl -tag -width flag
36.It Fl r
37If any of the source files are directories,
38.Nm rcp
39copies each subtree rooted at that name; in this case
40the destination must be a directory.
41.It Fl p
42The
43.Fl p
44option causes
45.Nm rcp
46to attempt to preserve (duplicate) in its copies the modification
47times and modes of the source files, ignoring the
48.Ar umask  .
49By default, the mode and owner of
50.Ar file2
51are preserved if it already existed; otherwise the mode of the source file
52modified by the
53.Xr umask  2
54on the destination host is used.
55.It Fl k
56The
57.Fl k
58option requests
59.Nm rcp
60to obtain tickets
61for the remote host in realm
62.Ar realm
63instead of the remote host's realm as determined by
64.Xr krb_realmofhost  3  .
65.El
66.Pp
67If
68.Ar path
69is not a full path name, it is interpreted relative to
70the login directory of the specified user
71.Ar ruser
72on
73.Ar rhost  ,
74or your current user name if no other remote user name is specified.
75A
76.Ar path
77on a remote host may be quoted (using \e, ", or \(aa)
78so that the metacharacters are interpreted remotely.
79.Pp
80.Nm Rcp
81does not prompt for passwords; it performs remote execution
82via
83.Xr rsh  1  ,
84and requires the same authorization.
85.Pp
86.Nm Rcp
87handles third party copies, where neither source nor target files
88are on the current machine.
89.Sh SEE ALSO
90.Xr cp 1 ,
91.Xr ftp 1 ,
92.Xr rsh 1 ,
93.Xr rlogin 1
94.Sh HISTORY
95The
96.Nm rcp
97command appeared in
98.Bx 4.2 .
99The version of
100.Nm rcp
101described here
102has been reimplemented with Kerberos in
103.Bx 4.3 Reno .
104.Sh BUGS
105Doesn't detect all cases where the target of a copy might
106be a file in cases where only a directory should be legal.
107.Pp
108Is confused by any output generated by commands in a
109.Pa \&.login ,
110.Pa \&.profile ,
111or
112.Pa \&.cshrc
113file on the remote host.
114.Pp
115The destination user and hostname may have to be specified as
116``rhost.rname'' when the destination machine is running the
117.Bx 4.2
118version of
119.Nm rcp  .
120