> DOS 中文参考手册 > rcp

RCP

(rcp)


在 Windows 2000 计算机和运行远程外壳端口监控程序 rshd 的系统之间复制文件。

rcp 命令是一个连接命令,从 Windows 2000 计算机发出该命令时,也可以用于其他传输在两台运行 rshd 的计算机之间复制文件。

rshd 端口监控程序可以在 UNIX 计算机上使用,而在 Windows 2000 上不能使用,所以 Windows 2000 计算机仅可以作为发出命令的系统参与。

远程计算机必须也通过运行 rshd 提供 rcp 实用程序。

rcp [-a | -b] [-h] [-r] source1 source2 ... sourceN destination

参数

-a 指定 ASCII 传输模式。此模式在传出文件上将回车/换行符转换为回车符,在传入文件中将换行符转换为回车/换行符。该模式为默认的传输模式。

-b 指定二进制图像传输模式。没有执行回车/换行符转换。

-h 传输 Windows 2000 计算机上标记为隐藏属性的源文件。如果没有该选项,在 rcp 命令行上指定隐藏文件的效果与文件不存在一样。

-r 将源的所有子目录内容递归复制到目标。source 和 destination 都必须是目录,虽然即使源不是目录,使用 -r 也能够工作。但将没有递归。

source 和 destination 格式必须为 [computer[.user]:]filename。如果忽略了 [computer[.user]:] 部分,计算机将假定为本地计算机。如果省略了 [.user] 部分,将使用当前登录的 Windows 2000 用户名。如果使用了完全合格的计算机名,其中包含句点 (.) 分隔符,则必须包含 [.user]。否则,计算机名的最后部分将解释为用户名。如果指定了多个源文件,则destination 必须是目录。

如果文件名不是以 UNIX 的正斜杠 (/) 或 Windows 2000 系统的反斜杠 (\) 打头,则假定相对于当前的工作目录。在Windows 2000 中,这是发出命令的目录。在远程系统中,这是远程用户的登录目录。句点 (.) 表示当前的目录。在远程路径中使用转义字符(\、" 或 '),以便在远程计算机中使用通配符。


Copies files to and from computer running the RCP service.

RCP [-a | -b] [-h] [-r] [host][.user:]source [host][.user:] path\destination

  -a                 Specifies ASCII transfer mode. This mode converts the EOL characters to a carriage return for UNIX and a carriage return/line feed for personal computers.

This is the default transfer mode.

  -b                 Specifies binary image transfer mode.

  -h                 Transfers hidden files.

  -r                 Copies the contents of all subdirectories;

                     destination must be a directory.

  host               Specifies the local or remote host. If host is specified as an IP address OR if host name contains dots, you must specify the user.

  .user:             Specifies a user name to use, rather than the current user name.

  source             Specifes the files to copy.

  path\destination   Specifies the path relative to the logon directory on the remote host.

 Use the escape characters(\ , ", or ') in remote paths to use wildcard characters on the remote host.


上一篇:
下一篇: