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