1.\" $NetBSD: rcp.1,v 1.13 2002/09/25 15:18:42 wiz Exp $ 2.\" 3.\" Copyright (c) 1983, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)rcp.1 8.1 (Berkeley) 5/31/93 35.\" 36.Dd May 31, 1993 37.Dt RCP 1 38.Os 39.Sh NAME 40.Nm rcp 41.Nd remote file copy 42.Sh SYNOPSIS 43.Nm 44.Op Fl Kpx 45.Op Fl k Ar realm 46.Ar file1 file2 47.Nm "" 48.Op Fl Kprx 49.Op Fl k Ar realm 50.Ar file ... 51.Ar directory 52.Sh DESCRIPTION 53.Nm 54copies files between machines. 55Each 56.Ar file 57or 58.Ar directory 59argument is either a remote file name of the 60form ``rname@rhost:path'', or a local file name (containing no `:' characters, 61or a `/' before any `:'s). 62.Pp 63.Bl -tag -width flag 64.It Fl K 65The 66.Fl K 67option turns off all Kerberos authentication. 68.It Fl k 69The 70.Fl k 71option requests 72.Nm 73to obtain tickets 74for the remote host in realm 75.Ar realm 76instead of the remote host's realm as determined by 77.Xr krb_realmofhost 3 . 78.It Fl p 79The 80.Fl p 81option causes 82.Nm 83to attempt to preserve (duplicate) in its copies the modification 84times and modes of the source files, ignoring the 85.Ar umask . 86By default, the mode and owner of 87.Ar file2 88are preserved if it already existed; otherwise the mode of the source file 89modified by the 90.Xr umask 2 91on the destination host is used. 92.It Fl r 93If any of the source files are directories, 94.Nm 95copies each subtree rooted at that name; in this case 96the destination must be a directory. 97.It Fl x 98The 99.Fl x 100option turns on 101.Tn DES 102encryption for all data passed by 103.Nm "" . 104This may impact response time and 105.Tn CPU 106utilization, but provides 107increased security. 108.El 109.Pp 110If 111.Ar path 112is not a full path name, it is interpreted relative to 113the login directory of the specified user 114.Ar ruser 115on 116.Ar rhost , 117or your current user name if no other remote user name is specified. 118A 119.Ar path 120on a remote host may be quoted (using \e, ", or \(aa) 121so that the metacharacters are interpreted remotely. 122.Pp 123.Nm 124does not prompt for passwords; it performs remote execution 125via 126.Xr rsh 1 , 127and requires the same authorization. 128.Pp 129.Nm 130handles third party copies, where neither source nor target files 131are on the current machine. 132.Sh SEE ALSO 133.Xr cp 1 , 134.Xr ftp 1 , 135.Xr rlogin 1 , 136.Xr rsh 1 , 137.Xr hosts.equiv 5 , 138.Xr rhosts 5 139.Sh HISTORY 140The 141.Nm 142utility appeared in 143.Bx 4.2 . 144The version of 145.Nm 146described here 147has been reimplemented with Kerberos in 148.Bx 4.3 Reno . 149.Sh BUGS 150Doesn't detect all cases where the target of a copy might 151be a file in cases where only a directory should be legal. 152.Pp 153Is confused by any output generated by commands in a 154.Pa \&.login , 155.Pa \&.profile , 156or 157.Pa \&.cshrc 158file on the remote host. 159.Pp 160The destination user and hostname may have to be specified as 161``rhost.rname'' when the destination machine is running the 162.Bx 4.2 163version of 164.Nm "" . 165