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