HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)
r
rcp(1) Kerberos rcp(1)
NAME
rcp - remote file copy
SYNOPSIS
Copy Single File
rcp [-k realm ][-P
][-p][-S size ][-R size ] source_file1 dest_file
Copy Multiple Files
rcp [-k realm ][-P][
-p][-S size ][-R size ] source_file1 [source_file2]... dest_dir
Copy One or More Directory Subtrees
rcp [-k realm ][-P][
-p][-S size ][-R size ] -r source_dir1 [source_dir2]... dest_dir
Copy Files and Directory Subtrees
rcp [-k realm ][-P
][-p][-S size ][-R size ] -r file_or_dir1 [file_or_dir2]... dest_dir
DESCRIPTION
The
rcp command copies files, directory subtrees, or a combination of files and directory subtrees from one
or more systems to another. In many respects, it is similar to the cp command (see cp(1)).
To use
rcp, you must have read access to files being copied, and read and search (execute) permission on
all directories in the directory path. Note that there are special requirements for third-party transfers
which are described in the Third-Party Transfers section below.
In a Kerberos V5 Network Authentication environment,
rcp uses the Kerberos V5 protocol while initiat-
ing the connection to a remote host. The authorization mechanism is dependent on the command line
options used to invoke
remshd on the remote host (i.e., -K, -R, -r,or
-k). Kerberos authentication
and authorization rules are described in the Secure Internet Services man page, sis(5).
Although Kerberos authentication and authorization may apply, the Kerberos mechanism is not applied
when copying files. The files are still transferred in cleartext over the network.
Options and Arguments
rcp recognizes the following options and arguments:
source_file
source_dir
The name of an existing file or directory on a local or remote machine that you want
copied to the specified destination. Source file and directory names are constructed as
follows:
user_name@hostname:pathname/filename
or
user_name@hostname:pathname/dirname
Component parts of file and directory names are described below. If multiple existing
files and/or directory subtrees are specified (source_file1, source_file2, ..., etc.), the
destination must be a directory. Shell file name expansion is allowed on both local
and remote systems. Multiple files and directory subtrees can be copied from one or
more systems to a single destination directory with a single command.
dest_file The name of the destination file. If host name and path name are not specified, the
existing file is copied into a file named dest_file in the current directory on the local
system. If dest_file already exists and is writable, the existing file is overwritten.
Destination file names are constructed the same way as source files except that file
name expansion characters cannot be used.
dest_dir The name of the destination directory. If host name and path name are not specified,
the existing file is copied into a directory named dest_dir in the current directory on
the local system. If dest_dir already exists in the specified directory path (or current
directory if not specified), a new directory named dest_dir is created underneath the
existing directory named dest_dir. Destination directory names are constructed the
same way as source directory tree names except that file name expansion characters
cannot be used.
file_or_dir If a combination of files and directories are specified for copying (either explicitly or by
file name expansion), only files are copied unless the
-r option is specified. If the -r
option is present, all files and directory subtrees whose names match the specified
HP-UX 11i Version 1: September 2005 − 1 − Hewlett-Packard Company Section 1−−807