NAME

globus delete - Submit a delete task

SYNOPSIS

globus delete [OPTIONS] — ENDPOINT_ID:PATH

globus delete [OPTIONS] ENDPOINT_ID --batch < INPUT_LINE(s)

DESCRIPTION

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

globus delete has two modes. Single target, which deletes one file or one directory, and batch, which takes in several lines to delete multiple files or directories. See "Batch Input" below for more information.

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.

Batch Input

If you give a SOURCE_PATH without the --batch flag, you will submit a single-file or single-directory delete task. This has behavior similar to cp and cp -r, across endpoints.

Using --batch, globus delete can submit a task which deletes multiple files or directories. Lines are taken from stdin, respecting quotes, and every line is treated as a path to a file or directory to delete.

Lines are of the form PATH

Note that unlike globus transfer --recursive is not an option at the per line level, instead, if given with the original command, all paths that point to directories will be recursively deleted.

Empty lines and comments beginning with # are ignored.

Batch only requires an ENDPOINT before passing lines, on stdin, but if you pass an ENPDOINT:PATH on the original command, this path will be used as a prefixes to all paths on stdin.

OPTIONS

--batch

Starts batch mode input for deletes, which takes in paths one line at a time from stdin to delete multiple files and/or directories. See "Batch Input" above for more information.

-r, --recursive

Delete any directories recursively. Note that unlike globus transfer this option need only be given once at the command level rather than per line if using batch input.

-f, ignore-missing

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

--deadline

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.

--dry-run

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

--label

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

--submission-id

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.

--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 https://jmespath.org/

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

EXAMPLES

Delete a single file.

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

Delete a directory recursively.

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

Use the batch input method to transfer multiple files and or dirs.

$ ep_id=ddb59af0-6d04-11e5-ba46-22000b92c6ec
$ globus delete $ep_id --batch --recursive
~/myfile1.txt
~/myfile2.txt
~/myfile3.txt
~/mygodatadir
<EOF>

EXIT STATUS

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