Globus CLI
The Globus Command Line Interface (CLI) is an alternative to the Globus website which enables one to interact with Globus (endpoints, tasks, etc.) using the command line.
Installation
This can be done by following these instructions. We recommend that you install pipx and Globus CLI in a virtual environment.
If you do choose to use a virtualenv, remember to activate it before trying to use any globus
commands and deactivate it when you are done.
Using the CLI
This page presents a comprehensive list of commands that can be used with the Globus CLI.
Transfer Example/Walkthrough
Here is an example of a file transfer that uses a virtualenv (which has already been set up):
Activation & Login
After entering the globus login
command, copy the supplied url into a browser, click 'Continue', click 'Allow', copy and paste the authorization code, and hit enter. You should then see something like this:
Getting Endpoint IDs
Before you make the transfer, you need to find the IDs of the source and destination endpoints. This can be done with the following command (or a variation of it):
The final term of this command can be any of the following:
administered-by-me
my-endpoints
my-gcp-endpoints
recently-used
in-use
shared-by-me
shared-with-me
Once you find the endpoints you need (in this case we want to transfer a file from BrownU_OscarGrouch_GDrive
to BrownU_CCV_Oscar
), set up your source_ep
and dest_ep
values using the IDs of the endpoints (these IDs are fake, so be sure to copy from the system output):
Transfer
Finally, transfer the file using the following command:
This command transfers a file named file1.txt
to the destination endpoint (its name in the destination will be mynewfile.txt
).
In order to have the timestamp for mynewfile.txt match the latest modification of file1.txt
rather than the time of the transfer, you can add --preserve-mtime
to the end of the line (run the line below instead of the one above):
Deactivation
Finally, deactivate the virtualenv:
For more examples of how to use the Globus CLI, try the QuickStart Guide or the Examples page.
If you have any issues, feel free to contact support@ccv.brown.edu.
Last updated