Transfer Commands
The following Globus Command Line Interface (CLI) commands perform and manage transfer functions on the files and folders at Globus endpoints. Visit the linked Globus pages for more details on each of these commands. Note that all sample commands are presented as they would be entered in a CLI interpreter.
The globus transfer
command
can take two forms: single target and batch.
Single Transfers
To transfer a single file or folder, use the form that takes two endpoint/ path parameters and copies the contents of the location specified by the first parameter to the location specified by the second. The "to" file name need not match the name of the "from" file.
Note that for single file/folder transfers the destination path is required.
When transferring a folder and all of its contents, use the --recursive
option.
In these examples, the transfers are made to the user's home folder at the
second Globus Tutorial endpoint, which is initially empty.
See the previous page to see how to set
the gte1
and gte2
environment variables.
The transfer tasks, which are performed asynchronously,
quickly return a unique Globus task ID and then run in the background.
A task ID can be used to inquire about the transfer status or to cancel the operation.
The last globus ls
command below was issued after waiting for the transfers to be completed.
Batch Transfers
To perform a "batch" transfer of multiple targets,
use the --batch
option and
specify only the source and target endpoints in the command.
Then, individual source files/folders are identified on separate lines of either
the stdin
stream until an end-of-file (EOF) is entered
or a text file.
Each line is of the form:
The --recursive
option must be provided when the source path is a folder.
Blank lines and lines beginning with a '#' (comments) are ignored.
The --batch
option takes an argument which is either a file name or
-
if the list of objects to transfer is provided on the stdin stream.
Assume you have a file list.txt
with the following contents:
The following command uses that file to perform a transfer from the Globus Tutorial Endpoint 2 to the home directory on Endpoint 1 (which was empty at the start):