copy

This command copies files and directories to and from the data zos.

Syntax

zos copy source dest [--recursive] 

Arguments

source

The datagrid source from which the files or directories are to be copied.

dest

The datagrid destination to which the files or directories are to be copied.

Options

-r, --recursive

Processes directories recursively.

-C, --cols=<value>

Specifies the terminal width for formatting. The user must enter a value with this option.

-h, --help

Displays a help message for this operation.

-d, --debug

Turns on debug output during this operation.

-v, --verbose

Turns on verbose output during this operation.

-z, --tls=<value>

Force TLS/SSL encryption [on|off]. The user must enter a value with this option.

-Z, --tlsPort=<value>

Port number for TLS/SSL connections. The user must enter a value with this option.

-y, --tlsYesNew

Force acceptance of new TLS server certificates.

-Y, --tlsYesAll

Force acceptance of all TLS server certificates.

Examples

Example 1

To copy a local file into a previously created datagrid subdirectory, use the following command:

zos copy local.txt grid:///images

Example 2

To copy a file from the current job instance directory to a local file, use the following command:

zos copy grid:///^/results.txt local.txt

Example 3

To copy a file from a named job instance directory to a local file, use the following command:

zos copy grid:///^user.myjob.1024/results.txt local.txt

Example 4

To copy a local file into the job directory for job myjob, use the following command:

zos copy local.txt grid:///!myjob

Example 5

To copy a local file into the current user’s home directory, use the following command:

zos copy local.txt grid:///~/local.txt

Example 6

To copy a local file into another user’s (barney) home directory, use the following command:

zos copy local.txt grid:///~barney/local.txt

Example 7

To copy a local file into a subdirectory of the job directory, use the following command:

zos copy local.txt grid:///!myjob/subdir

Example 8

To copy a local file into the current job instance directory, use the following command:

zos copy local.txt grid:///^/

Example 9

To recursively copy a local directory to the datagrid root, creating a new directory, use the following command:

zos copy /home/tester/myDir grid:/// -r