rename - Quickly rename a file or directory




The rename command renames a file or directory on an endpoint.

The old path must be an existing file or directory. The new path must not yet exist.

The new path does not have to be in the same directory as the old path, but most endpoints will require it to stay on the same filesystem (you can not rename across a filesystem boundary).

The endpoint name must be entered twice (in the old and new paths) for the sake of path syntax consistency.

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".


Rename a directory:

$ rename go#ep1/~/tempdir go#ep1/~/project-foo


rename returns 0 on success, and 1 if a network or server error occurred.

© 2010- The University of Chicago Legal