Name

rcp

Synopsis

Stands for remote copy command, which copies 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 (only needs to be specified if different from those of logged-on user). If hostname is omitted, then the destination is the local machine. If hostname is specified as a full DNS name such as george.mtit.com, then the username must be specified; otherwise, the last part of the DNS name (here .com) will be 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 will create the directory /tmp/pub on BONGO and copy the contents of C:\pub to this directory.

Notes

  • Windows 2000 does not include a rshd deamon, so rcp is used mainly for copying files between Windows 2000 and Unix ...

Get Windows 2000 Administration in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.