globus ls - List endpoint directory contents




The globus ls command lists files and subdirectories on an endpoint. If no path is given, the default directory on that endpoint will be used.

If using text output files and directories are printed with one entry per line in alphabetical order. Directories are always displayed with a trailing /.

Automatic Endpoint Activation

This command requires all endpoints it uses to be activated. It will attempt to auto-activate any endpoints that are not active, but if auto-activation fails, you will need to manually activate the endpoint. See globus endpoint activate for more details.


-a, --all

Show hidden files and directories that start with .

-l, --long

Long form tabular output similar to ls -l.

-r, --recursive

Do a recursive listing similar to ls -R only goes as deep as allowed by the --recursive-depth-limit. Note that this can quickly become a very expensive operation and may take a significant amount of time to complete or even fail on rate limits.


Set the depth limit when using the --recursive option. Defaults to 3 if not given.


Filter results to filenames matching the given pattern.

Filter patterns must start with =, ~, !, or !~
If none of these are given, = will be used

= does exact matching

~ does regex matching, supporting globs (*)

! does inverse = matching

!~ does inverse ~ matching

See the examples section for various forms of usage.

--map-http-status TEXT

Map non success HTTP response codes to exit codes other than 1. e.g. "--map-http-satus 403=0,404=0" would exit with 0 even if a 403 or 404 http error code was received. Valid exit codes are 0,1,50-99.

-F, --format [json|text]

Set the output format for stdout. Defaults to "text".

--jq, --jmespath EXPR

Supply a JMESPath expression to apply to json output. Takes precedence over any specified --format and forces the format to be json processed by this expression.

A full specification of the JMESPath language for querying JSON structures may be found at

-h, --help

Show help text for this command.

-v, --verbose

Control the level of output.

Use -v or --verbose to show warnings and any additional text output.

Use -vv to add informative logging.

Use -vvv to add debug logging and full stack on any errors. (equivalent to -v --debug)


List files and dirs in your default directory on an endpoint.

$ ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec
$ globus ls $ep_id

List files and dirs on a specific path on an endpoint.

$ ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec
$ globus ls $ep_id:/share/godata/

List files and dirs on a specific path on an endpoint, filtering in various ways.

$ ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec
$ globus ls $ep_id:/share/godata/ --filter '~*.txt'  # all txt files
$ globus ls $ep_id:/share/godata/ --filter '!~file1.*'  # not starting in "file1."
$ globus ls $ep_id:/share/godata/ --filter '~*ile3.tx*'  # anything with "ile3.tx"
$ globus ls $ep_id:/share/godata/ --filter '=file2.txt'  # only "file2.txt"
$ globus ls $ep_id:/share/godata/ --filter 'file2.txt'  # same as '=file2.txt'
$ globus ls $ep_id:/share/godata/ --filter '!=file2.txt'  # anything but "file2.txt"

Compare a grep with a globus ls --filter. These two are the same, but the filter will be faster because it doesn’t require that filenames which are filtered out are returned to the CLI:

$ ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec
$ globus ls $ep_id:/share/godata/ | egrep '.*\.txt$'  # done with grep, okay
$ globus ls $ep_id:/share/godata/ --filter '~*.txt'  # done with --filter, better


0 on success.

1 if a network or server error occurred, unless --map-http-status has been used to change exit behavior on http error codes.

2 if the command was used improperly.

© 2010- The University of Chicago Legal