Skip to documentation
DocumentationAll documentsEnglish

MOVE(nged)

NAME

move, mv - rename a database object

On this page

SYNOPSIS

move from to
mv from to

DESCRIPTION

The move command (also available as mv) renames an existing database object from from to to. It is a pure rename operation — the object’s geometry is unchanged; only its name in the database directory is updated.

The command performs the following steps:

  1. Looks up from in the database; returns an error if it does not exist.

  2. Verifies that to does not already exist; returns an error if it does.

  3. Reads the object’s internal data, renames it in the in-memory directory via db_rename, then writes it back under the new name.

  4. Updates the current display list: if the top-level path element of any displayed object matches from, it is updated to to so the display remains consistent.

EXAMPLES

Example 1. Rename an object

mged> move old_name.s new_name.s

Renames the solid old_name.s to new_name.s in the database.

Example 2. Using the mv alias

mged> mv wing_left.r wing.r

Renames wing_left.r to wing.r. The mv alias is equivalent to move.

Example 3. Attempting to rename to an existing name

mged> move box.s sphere.s

sphere.s: already exists

Returns an error if sphere.s already exists in the database. The original box.s is left unchanged.

AUTHOR

BRL-CAD Team

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org