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