add -DCRYPT to get -x processing
[unix-history] / usr / src / bin / rcp / rcp.1
CommitLineData
b5dc1377 1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
ebb479fc 2.\" All rights reserved.
3b46468b 3.\"
27c71911 4.\" %sccs.include.redist.man%
3b46468b 5.\"
5325ced3 6.\" @(#)rcp.1 6.11 (Berkeley) %G%
ebb479fc 7.\"
b5dc1377
CL
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 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
3b46468b 27copies files between machines. Each
b5dc1377 28.Ar file
3b46468b 29or
b5dc1377 30.Ar directory
3b46468b 31argument is either a remote file name of the
2d1955f2 32form ``rname@rhost:path'', or a local file name (containing no `:' characters,
c33a908d 33or a `/' before any `:'s).
b5dc1377
CL
34.Pp
35.Tp Fl r
36If any of the source files are directories,
37.Nm rcp
3b46468b
KM
38copies each subtree rooted at that name; in this case
39the destination must be a directory.
b5dc1377 40.Tp Fl p
ec6dcb7a 41The
b5dc1377 42.Fl p
ec6dcb7a 43option causes
b5dc1377 44.Nm rcp
ec6dcb7a
JL
45to attempt to preserve (duplicate) in its copies the modification
46times and modes of the source files, ignoring the
b5dc1377
CL
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
2d1955f2 55The
b5dc1377 56.Fl k
2d1955f2 57option requests
b5dc1377 58.Nm rcp
2d1955f2
KF
59to obtain tickets
60for the remote host in realm
b5dc1377 61.Ar realm
2d1955f2 62instead of the remote host's realm as determined by
b5dc1377
CL
63.Xr krb_realmofhost 3 .
64.Tp
65.Pp
3b46468b 66If
b5dc1377 67.Ar path
3b46468b 68is not a full path name, it is interpreted relative to
2d1955f2 69the login directory of the specified user
b5dc1377
CL
70.Ar ruser
71on
72.Ar rhost ,
2d1955f2 73or your current user name if no other remote user name is specified.
b5dc1377
CL
74A
75.Ar path
3b46468b
KM
76on a remote host may be quoted (using \e, ", or \(aa)
77so that the metacharacters are interpreted remotely.
b5dc1377
CL
78.Pp
79.Nm Rcp
2d1955f2
KF
80does not prompt for passwords; it performs remote execution
81via
b5dc1377 82.Xr rsh 1 ,
2d1955f2 83and requires the same authorization.
b5dc1377
CL
84.Pp
85.Nm Rcp
3b46468b
KM
86handles third party copies, where neither source nor target files
87are on the current machine.
b5dc1377
CL
88.Sh SEE ALSO
89.Xr cp 1 ,
90.Xr ftp 1 ,
91.Xr rsh 1 ,
92.Xr rlogin 1
93.Sh HISTORY
94.Nm Rcp
95appeared in 4.2 BSD. The version of rcp described here
5325ced3 96has been reimplemented with Kerberos in 4.3+Reno BSD.
b5dc1377 97.Sh BUGS
3b46468b
KM
98Doesn't detect all cases where the target of a copy might
99be a file in cases where only a directory should be legal.
b5dc1377 100.Pp
3b46468b 101Is confused by any output generated by commands in a
b5dc1377
CL
102.Pa \&.login ,
103.Pa \&.profile ,
104or
105.Pa \&.cshrc
106file on the remote host.
107.Pp
891645ee
KB
108The destination user and hostname may have to be specified as
109``rhost.rname'' when the destination machine is running the 4.2BSD
b5dc1377
CL
110version of
111.Nm rcp .