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