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).
If you give a PATH without the
--batch flag, you will submit a
single-file or single-directory delete task.
globus delete can submit a task which deletes multiple files or
Each line of
--batch input 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.
If you use
--batch and supply a PATH via the commandline, the commandline PATH is
treated as a prefix to all of the paths read from the
Submit the task even if the endpoint(s) aren’t currently activated.
Set a deadline for this to be canceled if not completed by.
Set a label for this task.
Task submission ID, as generated by
globus task generate-submission-id. Used for safe resubmission in the presence of network failures.
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'.
Don’t actually submit the task, print submission data instead
Accept a batch of paths from a file. Use
-to read from stdin.
Uses ENDPOINT_ID as passed on the commandline.
See documentation on "Batch Input" for more information.
- --enable-globs / --no-enable-globs
Enable expansion of *, ?, and [ ] characters in the last component of file paths, unless they are escaped with a preceding backslash, \ [default: no-enable-globs]
- --star-silent, --unsafe
Don’t prompt when the trailing character is a "*". Implicit in --batch
- -f, --ignore-missing
Don’t throw errors if the file or dir is absent
- -r, --recursive
Recursively delete dirs
Optional value passed to identity mapping specifying which local user account to map to. Only usable with Globus Connect Server v5 mapped collections.
- -v, --verbose
Control level of output.
- -h, --help
Show this message and exit.
Output format for stdout. Defaults to text.
A JMESPath expression to apply to json output. Forces the format to be json processed by this expression.
Map HTTP statuses to any of these exit codes: 0,1,50-99. e.g. "404=50,403=51"
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>
Submit a deletion task and get back the task ID for use in
globus task wait:
$ ep_id=ddb59af0-6d04-11e5-ba46-22000b92c6ec $ task_id="$(globus delete $ep_id:~/mydir --recursive --jmespath 'task_id' --format unix)" $ echo "Waiting on $task_id" $ globus task wait "$task_id"
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.
3 if the command was used on the wrong type of object, e.g. a collection command used on an endpoint.
4 if the command has authentication or authorization requirements which were not met, as in ConsentRequired errors or missing logins.