HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)

r
rcp(1) Kerberos rcp(1)
file_or_dir name are copied.
-k realm Obtain tickets from the remote host in the specified realm instead of the remote host’s
default realm as specified in the configuration file krb.realms.
-P Disable Kerberos authentication. Only applicable in a secure environment based on
Kerberos V5. If the remote host has been configured to prevent non-secure access,
using this option would result in the generic error,
rcmd: connect: <hostname>: Connection refused
See DIAGNOSTICS in remshd(1M) for more details.
-p Preserve (duplicate) modification times and modes (permissions) of source files, ignor-
ing the current setting of the umask file creation mode mask. If this option is
specified,
rcp preserves the sticky bit only if the target user is superuser.
If the -p option is not specified,
rcp preserves the mode and owner of dest_file if it
already exists; otherwise
rcp uses the mode of the source file modified by the
umask
on the destination host. Modification and access times of the destination file are set to
the time when the copy was made.
-S size This option sets the size of the socket send buffer.
-R size This option sets the size of the socket receive buffer.
-r Recursively copy directory subtrees rooted at the source directory name. If any direc-
tory subtrees are to be copied, rcp recursively copies each subtree rooted at the
specified source directory name to directory dest_dir.Ifsource_dir is being copied to
an existing directory of the same name, rcp creates a new directory source_dir
within dest_dir and copies the subtree rooted at source_dir to dest_dir/source_dir.If
dest_dir does not exist, rcp creates it and copies the subtree rooted at source_dir to
dest_dir.
Constructing File and Directory Names
As indicated above, file and directory names contain one, two, or four component parts:
user_name Login name to be used for accessing directories and files on remote system.
hostname Hostname of remote system where directories and files are located.
pathname Absolute directory path name or directory path name relative to the login directory of
user user_name.
filename Actual name of source or destination file. File name expansion is allowed on source le
names.
dirname Actual name of source or destination directory subtree. File name expansion is allowed
on source directory names.
Each file or directory argument is either a remote file name of the form hostname
:path, or a local file name
(with a slash (
/) before any colon (:)). hostname can be either an ofcial host name or an alias (see
hosts(4)). If hostname is of the form ruser@rhost, ruser is used on the remote host instead of the current
user name. An unspecified path (that is, hostname:) refers to the remote users login directory. If path
does not begin with /, it is interpreted relative to the remote user’s login directory on hostname. Shell
metacharacters in remote paths can be quoted with backslash (\), single quotes (’’), or double quotes (
""),
so that they will be interpreted remotely.
rcp does not prompt for passwords. In a non-secure or traditional environment, user authorization is
checked by determining if the current local user name or any user name specified via ruser exists on rhost.
In a Kerberos V5 Network Authentication or secure environment, the authorization method is dependent
upon the command line options for remshd (see remshd(1M) for details). In either case, remote command
execution via remsh(1) and rcmd(3N) must be allowed and remshd(1M) must be executable on the remote
host.
Third-Party Transfers
Third-party transfers in the following form:
rcp ruser1@rhost1:path1 ruser2@rhost2:path2
are performed as:
Section 1808 Hewlett-Packard Company 2 HP-UX 11i Version 1: September 2005