p The .Ar rhost can be an IPv4 or an IPv6 address string. Since IPv6 addresses already contain .Sq : (colon) characters, an IPv6 address string must be enclosed between .Sq [ (left square bracket) and .Sq ] (right square bracket) characters. Otherwise, the first occurrence of a .Sq : (colon) character would be interpreted as the separator between the .Ar rhost and the .Ar path . For example,
p .Dl [2001:DB8::800:200C:417A]:tmp/file
p Options: l -tag -width flag t Fl 4 Use IPv4 addresses only. t Fl 6 Use IPv6 addresses only. t Fl p The .Fl p option causes .Nm to attempt to preserve (duplicate) in its copies the modification times and modes of the source files, ignoring the .Ar umask . By default, the mode and owner of .Ar file2 are preserved if it already existed; otherwise the mode of the source file modified by the .Xr umask 2 on the destination host is used. t Fl r If any of the source files are directories, .Nm copies each subtree rooted at that name; in this case the destination must be a directory. .El
p If .Ar path is not a full path name, it is interpreted relative to the login directory of the specified user .Ar ruser on .Ar rhost , or your current user name if no other remote user name is specified. A .Ar path on a remote host may be quoted (using \e, ", or \(aa) so that the metacharacters are interpreted remotely.
p .Nm does not prompt for passwords; it performs remote execution via .Xr rsh 1 , and requires the same authorization.
p .Nm handles third party copies, where neither source nor target files are on the current machine. .Sh SEE ALSO .Xr cp 1 , .Xr ftp 1 , .Xr rcmd 1 , .Xr rlogin 1 , .Xr rsh 1 , .Xr rcmd 3 , .Xr hosts.equiv 5 , .Xr rhosts 5 , .Xr environ 7 .Sh HISTORY The .Nm utility appeared in x 4.2 . The version of .Nm described here has been reimplemented with Kerberos in x 4.3 Reno . .Sh BUGS Doesn't detect all cases where the target of a copy might be a file in cases where only a directory should be legal.
p Is confused by any output generated by commands in a
a .login ,
a .profile , or
a .cshrc file on the remote host.
p The destination user and hostname may have to be specified as .Dq rhost.rname when the destination machine is running the x 4.2 version of .Nm .