Commit | Line | Data |
---|---|---|
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 | 27 | copies files between machines. Each |
b5dc1377 | 28 | .Ar file |
3b46468b | 29 | or |
b5dc1377 | 30 | .Ar directory |
3b46468b | 31 | argument is either a remote file name of the |
2d1955f2 | 32 | form ``rname@rhost:path'', or a local file name (containing no `:' characters, |
c33a908d | 33 | or a `/' before any `:'s). |
b5dc1377 CL |
34 | .Pp |
35 | .Tp Fl r | |
36 | If any of the source files are directories, | |
37 | .Nm rcp | |
3b46468b KM |
38 | copies each subtree rooted at that name; in this case |
39 | the destination must be a directory. | |
b5dc1377 | 40 | .Tp Fl p |
ec6dcb7a | 41 | The |
b5dc1377 | 42 | .Fl p |
ec6dcb7a | 43 | option causes |
b5dc1377 | 44 | .Nm rcp |
ec6dcb7a JL |
45 | to attempt to preserve (duplicate) in its copies the modification |
46 | times and modes of the source files, ignoring the | |
b5dc1377 CL |
47 | .Ar umask . |
48 | By default, the mode and owner of | |
49 | .Ar file2 | |
50 | are preserved if it already existed; otherwise the mode of the source file | |
51 | modified by the | |
52 | .Xr umask 2 | |
53 | on the destination host is used. | |
54 | .Tp Fl k | |
2d1955f2 | 55 | The |
b5dc1377 | 56 | .Fl k |
2d1955f2 | 57 | option requests |
b5dc1377 | 58 | .Nm rcp |
2d1955f2 KF |
59 | to obtain tickets |
60 | for the remote host in realm | |
b5dc1377 | 61 | .Ar realm |
2d1955f2 | 62 | instead of the remote host's realm as determined by |
b5dc1377 CL |
63 | .Xr krb_realmofhost 3 . |
64 | .Tp | |
65 | .Pp | |
3b46468b | 66 | If |
b5dc1377 | 67 | .Ar path |
3b46468b | 68 | is not a full path name, it is interpreted relative to |
2d1955f2 | 69 | the login directory of the specified user |
b5dc1377 CL |
70 | .Ar ruser |
71 | on | |
72 | .Ar rhost , | |
2d1955f2 | 73 | or your current user name if no other remote user name is specified. |
b5dc1377 CL |
74 | A |
75 | .Ar path | |
3b46468b KM |
76 | on a remote host may be quoted (using \e, ", or \(aa) |
77 | so that the metacharacters are interpreted remotely. | |
b5dc1377 CL |
78 | .Pp |
79 | .Nm Rcp | |
2d1955f2 KF |
80 | does not prompt for passwords; it performs remote execution |
81 | via | |
b5dc1377 | 82 | .Xr rsh 1 , |
2d1955f2 | 83 | and requires the same authorization. |
b5dc1377 CL |
84 | .Pp |
85 | .Nm Rcp | |
3b46468b KM |
86 | handles third party copies, where neither source nor target files |
87 | are 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 | |
95 | appeared in 4.2 BSD. The version of rcp described here | |
5325ced3 | 96 | has been reimplemented with Kerberos in 4.3+Reno BSD. |
b5dc1377 | 97 | .Sh BUGS |
3b46468b KM |
98 | Doesn't detect all cases where the target of a copy might |
99 | be a file in cases where only a directory should be legal. | |
b5dc1377 | 100 | .Pp |
3b46468b | 101 | Is confused by any output generated by commands in a |
b5dc1377 CL |
102 | .Pa \&.login , |
103 | .Pa \&.profile , | |
104 | or | |
105 | .Pa \&.cshrc | |
106 | file on the remote host. | |
107 | .Pp | |
891645ee KB |
108 | The destination user and hostname may have to be specified as |
109 | ``rhost.rname'' when the destination machine is running the 4.2BSD | |
b5dc1377 CL |
110 | version of |
111 | .Nm rcp . |