Install Globus CLI:
Using instructions here: https://docs.globus.org/cli/
pipx install globus-cli
If you need to install pipx: https://pypa.github.io/pipx/installation/
This works for Linux, MacOS, and Windows 10.
Login to Globus:
Depending on where you run this, you'll either be redirected to the browser and asked to login to Globus or you'll be provided the message "Please authenticate with Globus here:" and a long URL. Copy and paste that into your browser and then login to Globus. Once you've done that, you're provided a "Native App Authorization Code." In your terminal, you'll be prompted with: "Enter the resulting Authorization Code here:" where you'll paste the "Native App Authorization Code" you were given in your browser.
You should see:
You have successfully logged in to the Globus CLI!
You can check your primary identity with
For information on which of your identities are in session use
globus session show
Logout of the Globus CLI with
To reactivate the Globus login to a particular endpoint after it timed out:
globus endpoint activate [EndpointID]
Globus CLI examples:
See all Globus commands:
Here we provide a few examples of tasks related to CCR endpoints
Search for an endpoint:
globus endpoint search "buffalo ccr"
NOTE: You won't have access to all of these endpoints. CCR users do have access to the endpoints labeled:
CCR Projects Space
CCR Home Directories
CCR Global Scratch Space
CCR Global Scratch Space NFS
Globus will return a long command (globus session consent) that you need to copy and paste. This will open a browser so you can login to UB. If this doesn't work for you, you're provided another command to run on the command line. Once the consent is accepted, you'll see the directory listing. To list the contents of your project space, enter the full path after the endpointID. For example:
globus ls 18cf7387-7fd4-45eb-8333-1f87b87f6dd2:/academic/PIgroup
To list your home directory contents:
globus ls 9bab382a-e098-4434-bd33-b1cd8a30c489:/user/YourUsername
You'll be provided with that long consent command again and asked to select the user account you want to use to access this directory.
We recommend you create bookmarks to the directories you use frequently. You can do this in the Globus portal or using the command line. Commands can be found here
Get your personal endpoint ID information and create an easier to use variable:
globus endpoint local-id
To use the variable:
How to Transfer from an endpoint on CCR to your personal endpoint:
First, let's create variable for our personal endpoint on our desktop/laptop ($myep) and the CCR home directory endpoint ($ccrhome):
globus endpoint local-id
Now transfer a file from your personal endpoint to your CCR home directory:
globus transfer $myep:testglobus.txt $ccrhome:/user/djm29/testglobus.txt
Check the status of your transfer:
globus task list
NOTE: you can also check in the the web portal and you'll get an email notifying you when the transfer completes or if there is an error.
To transfer multiple files at one time, you can create a batch transfer task using a text file that lists the files you want to transfer. Globus provides command info here