Copy file or folder to or from one or more remote hosts using transport protocol
remotecopy <
flags
>
<protocol options
>
remotecopy <
copies a file or folder to or from one or more remote hosts by using a transport protocol
(such as rsh or ssh). Copying from multiple hosts creates a separate file per host,
appending the hostname to the specified filename.flags
>
<protocol options
>
The following table describes the supported flags and options. You can combined multiple
flags in the same command, preceding each flag by a dash (-
).
Flags and Options | Operation |
---|---|
-local <file-or-foldername> | Specify the name of the file or folder on the local host. |
-remote <file-or-foldername> | Specify the name of the file or folder on the remote host. |
-from | Specify to copy from the remote hosts to the local host. You must use either
the -from flag, or the -to flag. |
-to | Specify to copy to the remote hosts from the local host. You must use either
the -from flag, or the -to flag. |
-remotehost host1[,host2[,...] | Specify the names of the hosts where you want to copy to or from. Separate the host names by commas without any white spaces. This is a mandatory argument. |
-remoteplatform { unix | windows } | Specify the platform of the remote hosts. This option is required only if different from the local platform. |
-quiet | Prevent remotecopy from prompting for missing information.
The command fails if all required information is not specified. |
-help | Print the help information for this command. |
-protocol <
|
Force the usage of a particular protocol type. Specifying a protocol type with all its required parameters also avoids interactive prompting and allows for use in scripts. The supported protocol types are To get more information about one particular protocol type, enter remotecopy -protocol <type> -help For example: remotecopy -protocol sftp -help |
< | Specify particular options for the protocol type being used. |
The file permissions on the copy might not be the same as the permissions on the original file.
Copy the local file mdce_def.sh
to two other machines. (Enter this
command on a single line.)
remotecopy -local mdce_def.sh -to -remote /matlab/toolbox/distcomp/bin -remotehost hostA,hostB
Retrieve folders of the same name from two hosts to the local machine. (Enter command on a single line.)
remotecopy -local C:\temp\log -from -remote C:\temp\mdce\log -remotehost winHost1,winHost2