xref: /original-bsd/bin/rcp/rcp.1 (revision e718337e)
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.12 (Berkeley) 10/21/90
7.\"
8.Dd
9.Dt RCP 1
10.Os BSD 4.2
11.Sh NAME
12.Nm rcp
13.Nd remote file copy
14.Sh SYNOPSIS
15.Nm rcp
16.Op Fl px
17.Op Fl k Ar realm
18.Ar file1 file2
19.Nm rcp
20.Op Fl px
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.Tp Fl r
36If any of the source files are directories,
37.Nm rcp
38copies each subtree rooted at that name; in this case
39the destination must be a directory.
40.Tp Fl p
41The
42.Fl p
43option causes
44.Nm rcp
45to attempt to preserve (duplicate) in its copies the modification
46times and modes of the source files, ignoring the
47.Ar umask  .
48By default, the mode and owner of
49.Ar file2
50are preserved if it already existed; otherwise the mode of the source file
51modified by the
52.Xr umask  2
53on the destination host is used.
54.Tp Fl k
55The
56.Fl k
57option requests
58.Nm rcp
59to obtain tickets
60for the remote host in realm
61.Ar realm
62instead of the remote host's realm as determined by
63.Xr krb_realmofhost  3  .
64.Tp Fl x
65The
66.Fl x
67option turns on DES encryption for all data passed by
68.Nm rcp .
69This may impact response time and CPU utilization, but provides
70increased security.
71.Tp
72.Pp
73If
74.Ar path
75is not a full path name, it is interpreted relative to
76the login directory of the specified user
77.Ar ruser
78on
79.Ar rhost  ,
80or your current user name if no other remote user name is specified.
81A
82.Ar path
83on a remote host may be quoted (using \e, ", or \(aa)
84so that the metacharacters are interpreted remotely.
85.Pp
86.Nm Rcp
87does not prompt for passwords; it performs remote execution
88via
89.Xr rsh  1  ,
90and requires the same authorization.
91.Pp
92.Nm Rcp
93handles third party copies, where neither source nor target files
94are on the current machine.
95.Sh SEE ALSO
96.Xr cp 1 ,
97.Xr ftp 1 ,
98.Xr rsh 1 ,
99.Xr rlogin 1
100.Sh HISTORY
101.Nm Rcp
102appeared in 4.2 BSD.  The version of rcp described here
103has been reimplemented with Kerberos in 4.3+Reno BSD.
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 4.2BSD
117version of
118.Nm rcp  .
119