CLI Menu

Command Line Interface (CLI) CLI QuickStart GuideCommand Line Interface (CLI) ExamplesUsing the CLI with High Assurance Resources


globus rm - Delete a single path; wait for it to complete


globus delete ['OPTIONS'] — ENDPOINT_ID:PATH


The globus rm command submits an asynchronous task that deletes files and/or directories on the target endpoint.

It then blocks and waits for that task to complete. Output is similar to globus task wait, and it is safe to globus task wait on a globus rm which timed out.

Symbolic links are never followed - only unlinked (deleted).

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.


-r, --recursive

Delete any directories recursively.

-f, ignore-missing

Ignore nonexistent files and directories. The task will succeed even if given paths do not exist.

--star-silent, --unsafe

Don’t prompt when the trailing character is a "\*".

By default, 'globus rm $ep_id:~/foo*' will prompt before deleting if used in an interactive context.

--timeout 'N'

Wait a maximum of 'N' seconds. If omitted, globus rm will wait indefinitely, until the task succeeds or fails.

--polling-interval 'M'

Check task status (and potentially hearbeat) every 'M' seconds. Defaults to 1.


Turn on heartbeats. When set, a '.' character will be printed to standard error every polling interval.


Set a deadline in ISO time format for this to be canceled if not completed by. ISO format is 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' If hours minutes and seconds are not given they are assumed to be 00:00:00. This time must not be in the past or the task will not be submitted.


Don’t submit the task, but print submission data instead.


Set an optional label for the task. These are meant for human readability and ease of filtering the task list


Specify a submission id to use with this task. Submission id’s are generated using 'globus task generate-submission-id' and prevent re-submission of a task with the same submission id in case of unreliable networks. Note that this is not the same id as the task’s id once it is submitted. If not specified the Globus CLI will still generate a submission id and safely resubmit tasks on network errors.


Submit the task even if one or more of the target endpoints are not currently activated. Once all target endpoints have been activated the task will begin normally. If this option is given, auto-activation will not be attempted on the target endpoints.


Comma separated list of task events which notify by email. 'on' and 'off' may be used to enable or disable notifications for all event types. Otherwise, use 'succeeded', 'failed', or 'inactive'. e.g. '--notify failed,inactive' to skip notifications on successful tasks.

--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)


Delete a single file.

$ ep_id=ddb59af0-6d04-11e5-ba46-22000b92c6ec
$ globus rm $ep_id:~/myfile.txt

Delete a directory recursively.

$ ep_id=ddb59af0-6d04-11e5-ba46-22000b92c6ec
$ globus rm $ep_id:~/mydir --recursive


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