Commit | Line | Data |
---|---|---|
3b46468b KM |
1 | .\" Copyright (c) 1983 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
c33a908d | 5 | .\" @(#)rcp.1 6.4 (Berkeley) %G% |
3b46468b | 6 | .\" |
b9719bce | 7 | .TH RCP 1C "" |
3b46468b KM |
8 | .UC 5 |
9 | .SH NAME | |
10 | rcp \- remote file copy | |
11 | .SH SYNOPSIS | |
12 | .B rcp | |
ec6dcb7a JL |
13 | [ |
14 | .B \-p | |
15 | ] file1 file2 | |
3b46468b KM |
16 | .br |
17 | .B rcp | |
18 | [ | |
2f7ce0a7 JB |
19 | .B \-p |
20 | ] [ | |
21 | .B \-r | |
3b46468b KM |
22 | ] file ... directory |
23 | .SH DESCRIPTION | |
24 | .I Rcp | |
25 | copies files between machines. Each | |
26 | .I file | |
27 | or | |
28 | .I directory | |
29 | argument is either a remote file name of the | |
30 | form ``rhost:path'', or a local file name (containing no `:' characters, | |
c33a908d | 31 | or a `/' before any `:'s). |
3b46468b KM |
32 | .PP |
33 | If the | |
34 | .B \-r | |
ec6dcb7a | 35 | option |
3b46468b KM |
36 | is specified and any of the source files are directories, |
37 | .I rcp | |
38 | copies each subtree rooted at that name; in this case | |
39 | the destination must be a directory. | |
40 | .PP | |
ec6dcb7a JL |
41 | By default, the mode and owner of |
42 | .I file2 | |
43 | are preserved if it already existed; otherwise the mode of the source file | |
44 | modified by the | |
45 | .IR umask (2) | |
46 | on the destination host is used. | |
47 | The | |
48 | .B \-p | |
49 | option causes | |
50 | .I rcp | |
51 | to attempt to preserve (duplicate) in its copies the modification | |
52 | times and modes of the source files, ignoring the | |
53 | .IR umask . | |
54 | .PP | |
3b46468b KM |
55 | If |
56 | .I path | |
57 | is not a full path name, it is interpreted relative to | |
58 | your login directory on | |
59 | .IR rhost . | |
60 | A | |
61 | .I path | |
62 | on a remote host may be quoted (using \e, ", or \(aa) | |
63 | so that the metacharacters are interpreted remotely. | |
64 | .PP | |
65 | .I Rcp | |
66 | does not prompt for passwords; your current local user name | |
67 | must exist on | |
68 | .I rhost | |
69 | and allow remote command execution via | |
70 | .IR rsh (1C). | |
71 | .PP | |
72 | .I Rcp | |
73 | handles third party copies, where neither source nor target files | |
74 | are on the current machine. | |
2f7ce0a7 | 75 | Hostnames may also take the form ``rname@rhost'' to use |
3b46468b KM |
76 | .I rname |
77 | rather than the current user name on the remote host. | |
2f7ce0a7 JB |
78 | The destination hostname may also take the form ``rhost.rname'' to |
79 | support destination machines that are running 4.2BSD | |
80 | versions of | |
81 | .I rcp. | |
3b46468b | 82 | .SH SEE ALSO |
ec6dcb7a | 83 | cp(1), ftp(1C), rsh(1C), rlogin(1C) |
3b46468b KM |
84 | .SH BUGS |
85 | Doesn't detect all cases where the target of a copy might | |
86 | be a file in cases where only a directory should be legal. | |
87 | .br | |
88 | Is confused by any output generated by commands in a | |
89 | \&.login, \&.profile, or \&.cshrc file on the remote host. |