NAME

rm - Delete files and directories on a server

SYNOPSIS

rm [OPTIONS] ENDPOINT/PATH

DESCRIPTION

The rm command is a quick and easy way to delete a single file, directory, or pattern. Its semantics are as close as possible to UNIX rm.

The PATH may have a shell-compatible wild card pattern in its final component. Type man glob for details.

Like UNIX rm, symbolic links are never followed - only unlinked (deleted).

Automatic Endpoint Activation

If an endpoint is not activated, this command will attempt to auto-activate it. Otherwise, the command will fail, and direct the user to run endpoint-activate and/or display a web URL for OAuth activation.

Endpoint Naming

This command supports the following endpoint identification formats:

  • UUID: "7865988a-aeb3-4e55-b8cd-938c258e7854"

  • Bookmark: "^test_bookmark". The bookmark name must be prepended with a "^" character. The bookmark name may have URL-escaped characters. If the bookmark name contains a "/", it must be URL-escaped as "%2F".

    Note:When a bookmark is used, the bookmark’s path is prepended to the input path.
  • Legacy Name: "bob#test_endpoint". This contains the user who owns the endpoint and the endpoint legacy name.

  • Unqualified Legacy Name: "test_endpoint". The user name defaults to the current logged in user.

Path Escaping

File and directory path(s) given as input are assumed to be URL-encoded. For example, "%20" is equivalent to a space (" "). A literal "%" character must be encoded as "%25".

OPTIONS

-r

Remove directories and their contents recursively. Note that just like regular rm, the path does not have to be a directory and symlinks are never followed.

-f

Ignore nonexistent files and directories. The operation succeeds if the path does not exist.

--label LABEL

Set the task’s label. The label can be displayed and searched for in commands such as status and details. See labels(7) for more details on labels.

-d DEADLINE

Set the task’s deadline. If the task has not completed by the deadline it will be automatically canceled. A suffix of "m", "h", or "d" may be specified to indicate minutes, hours, or days. If a unit suffix is not given it is assumed to be minutes. Example: "30m", "4h", "1d".

If a deadline is not explicitly set, Globus Online will give the task a flexible deadline that is automatically extended as long as it is making progress.

-D

Create a detached (background) task and exit.

--unsafe

Remove checks for possible human errors such as deleting all files in / and /~/. Only use this option if necessary and always be careful when issuing delete commands.

EXAMPLES

Remove files matching a pattern:

$ rm go#ep1/~/Downloads/*.tmp

Remove directories matching a pattern:

$ rm -rf go#ep1/~/Work/testdir*

EXIT STATUS

If -D is used, rm returns 0 if the task was successfully created. If -D is not used, rm returns 0 if the task completes successfully or non zero if the task has a fatal error, fails to complete by the deadline, or is canceled.

SEE ALSO

delete (1), glob(7)


© 2010- The University of Chicago Legal