rcp |
files between the client and a host running the
rshd daemon.
Syntax
rcp [-a | -b] [-h] [-r] [hostname][.username:]source [hostname]
[.username:]destination
Options
- -a
Switches to ASCII mode (the default), which converts end-of-line
control characters between MS-DOS and Unix format.- -b
Switches to binary mode (used to copy binary files such as images).- -h
Also copies hidden files.- -r
Recursively copies all subdirectories and their contents.- hostname[.username]
Specifies the destination host running the rshd
daemon and the credentials used for accessing the server (need to be
specified only if different from those of logged-on user). If
hostname is omitted, the destination is the local machine. If
hostname is specified as a full DNS name such as
george .mtit.com , the
username must be specified; otherwise, the last part of the DNS name
(here .com ) is interpreted as the username.- source
Indicates files or directories to be copied (include path if needed).- destination
Specifies target directory on rshd machine (path
can be absolute or relative).
Examples
Recursively copy the pub directory and its
contents from the local machine to a remote Unix machine as user
mitcht :
rcp -r C:\pub bongo.mitcht:/tmp
This command creates the directory /tmp/pub on
BONGO and copies the contents of
C:\pub to this directory.
Notes
- WS2003 doesn't include a rshd
daemon, so rcp is used mainly to copy files
between Windows and Unix machines. - rcp doesn't prompt for a password
before copying. You get around this by using the
.rhosts file in the user's home
directory on the rshd server to specify which
remote hostnames and usernames are allowed to use
rcp to copy files to or from the
rshd server.
See Also
rexec, rsh,
telnet