The following Globus Command Line Interface (CLI) commands provide information about, and perform functions on, the files and folders at a Globus endpoint. Many of the command names are familiar from Linux, but these CLI commands are distinct and may have different options. Visit the linked reference pages for more details on each of these commands.

These commands are demonstrated using Globus "tutorial endpoints", which are administered by the Globus team on their servers. These endpoints always exist, contain known data files and are accessible to all Globus users. The examples will refer to these endpoints using the shell variables $gte1 and $gte2. Those variables can be initialized by searching for the endpoints and then assigning their IDs to the variables, like this:

$ globus endpoint search --filter-owner-id go@globusid.org "Globus Tutorial"
ID                                   | Owner           | Display Name
------------------------------------ | --------------- | ---------------------------
ddb59aef-6d04-11e5-ba46-22000b92c6ec | go@globusid.org | Globus Tutorial Endpoint 1
ddb59af0-6d04-11e5-ba46-22000b92c6ec | go@globusid.org | Globus Tutorial Endpoint 2

$ gte1=ddb59aef-6d04-11e5-ba46-22000b92c6ec
$ gte2=ddb59af0-6d04-11e5-ba46-22000b92c6ec
Shell session

CLI commands that work with endpoints specify file and folder locations as combinations of the endpoint ID and an optional colon, followed by a path:

globus ls [options] <endpoint>:<path>
Shell session

For the Globus Tutorial endpoints, if no path is specified the user's home directory is selected. Alternatively, the path could begin with "/" to access some public folders on the endpoint. The following examples will use the public folder /share/godata and its contents.

globus ls

The globus ls command lists the contents of a specified endpoint and optional path. The command's options include -a, --all to include hidden files, -l, --long to produce long form output and -r, --recursive for recursively printing contents of folders.

Note that unlike the Linux ls command, the CLI ls does not allow patterns or wildcards to be specified in the path. Pattern matching must be done using the --filter option. The option takes a pattern string, which must begin with one of the following:

=
(exact match)
~
(regular expression match)
!
(not exact match)
!~
(not regular expression match)

These examples list the contents of the Globus Tutorial Endpoint #1's /share folder, as well as the contents of its godata sub-folder.

$ globus ls $gte1:/share
godata/

$ globus ls -l $gte1:/share/godata
Permissions | User | Group | Size | Last Modified             | File Type | Filename
----------- | ---- | ----- | ---- | ------------------------- | --------- | ---------
0644        | root | root  |    4 | 2017-05-18 16:07:10+00:00 | file      | file1.txt
0644        | root | root  |    4 | 2017-05-18 16:07:10+00:00 | file      | file2.txt
0644        | root | root  |    6 | 2017-05-18 16:07:10+00:00 | file      | file3.txt

$ globus ls --filter ~*1.txt $gte1:/share/godata
file1.txt
Shell session
globus mkdir

The globus mkdir command creates a new directory at the given endpoint/path combination:

globus mkdir <endpoint>:<path>
Shell session

The command returns 0 on success (as in the example below), 1 if there was an error (including if the path already exists), and 2 if the command was used improperly.

$ globus mkdir $gte1:test
The directory was created successfully

$ echo $?
0

$ globus ls $gte1
test/
Shell session
globus rename

The globus rename command renames a file or directory on an endpoint at the first path to have the name given by the second path:

rename <endpoint> <old-path> <new-path>
Shell session

The new path must not already exist. The command returns 0 on success, 1 if there was an error, and 2 if the command was used improperly.

$ globus rename $gte1 test my_test
File or directory renamed successfully

$ globus ls $gte1
my_test/
Shell session
globus rm

The globus rm command removes a file or directory at the given endpoint/path combination:

globus rm [options] <endpoint>:<path>
Shell session

When the path refers to a directory, you must use the "-r" recursive option. The remove operation is performed asynchronously and its progress can be tracked using the task ID that is returned by the command. The command has numerous options, some of which relate to managing the task. The command returns 0 on success, 1 if there was an error, and 2 if the command was used improperly.

$ globus rm -r $gte1:my_test
Delete task submitted under ID "ba7e48ae-8137-11e8-94e3-0a6d4e044368"

$ globus ls $gte1
Shell session
 
© 2025  |   Cornell University    |   Center for Advanced Computing    |   Copyright Statement    |   Access Statement