1.\" Copyright (c) 1983, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)rcp.1 6.14 (Berkeley) 07/27/91 7.\" 8.Dd 9.Dt RCP 1 10.Os BSD 4.3r 11.Sh NAME 12.Nm rcp 13.Nd remote file copy 14.Sh SYNOPSIS 15.Nm rcp 16.Op Fl px 17.Op Fl k Ar realm 18.Ar file1 file2 19.Nm rcp 20.Op Fl px 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.Bl -tag -width flag 36.It Fl r 37If any of the source files are directories, 38.Nm rcp 39copies each subtree rooted at that name; in this case 40the destination must be a directory. 41.It Fl p 42The 43.Fl p 44option causes 45.Nm rcp 46to attempt to preserve (duplicate) in its copies the modification 47times and modes of the source files, ignoring the 48.Ar umask . 49By default, the mode and owner of 50.Ar file2 51are preserved if it already existed; otherwise the mode of the source file 52modified by the 53.Xr umask 2 54on the destination host is used. 55.It Fl k 56The 57.Fl k 58option requests 59.Nm rcp 60to obtain tickets 61for the remote host in realm 62.Ar realm 63instead of the remote host's realm as determined by 64.Xr krb_realmofhost 3 . 65.It Fl x 66The 67.Fl x 68option turns on 69.Tn DES 70encryption for all data passed by 71.Nm rcp . 72This may impact response time and 73.Tn CPU 74utilization, but provides 75increased security. 76.El 77.Pp 78If 79.Ar path 80is not a full path name, it is interpreted relative to 81the login directory of the specified user 82.Ar ruser 83on 84.Ar rhost , 85or your current user name if no other remote user name is specified. 86A 87.Ar path 88on a remote host may be quoted (using \e, ", or \(aa) 89so that the metacharacters are interpreted remotely. 90.Pp 91.Nm Rcp 92does not prompt for passwords; it performs remote execution 93via 94.Xr rsh 1 , 95and requires the same authorization. 96.Pp 97.Nm Rcp 98handles third party copies, where neither source nor target files 99are on the current machine. 100.Sh SEE ALSO 101.Xr cp 1 , 102.Xr ftp 1 , 103.Xr rsh 1 , 104.Xr rlogin 1 105.Sh HISTORY 106The 107.Nm rcp 108command appeared in 109.Bx 4.2 . 110The version of 111.Nm rcp 112described here 113has been reimplemented with Kerberos in 114.Bx 4.3 Reno . 115.Sh BUGS 116Doesn't detect all cases where the target of a copy might 117be a file in cases where only a directory should be legal. 118.Pp 119Is confused by any output generated by commands in a 120.Pa \&.login , 121.Pa \&.profile , 122or 123.Pa \&.cshrc 124file on the remote host. 125.Pp 126The destination user and hostname may have to be specified as 127``rhost.rname'' when the destination machine is running the 128.Bx 4.2 129version of 130.Nm rcp . 131