Moves or renames an element or VOB link
Product | Command Type |
---|---|
ClearCase | cleartool subcommand |
ClearCase LT | cleartool subcommand |
Attache | command |
Platform |
---|
UNIX |
Windows |
Rename:
Move to another directory:
NOTE: The directory where the element to be moved or renamed resides must be checked out. The destination directory must also be checked out; this directory may be the same as the source directory. mv appends an appropriate line to the checkout comment for all relevant directories.
The mv command changes the name or location of an element or VOB symbolic link. For a file element that is checked out to your view, it relocates the checked-out version, also. (That is, it moves the view-private file with the same name as the element.) If the version is checked out to another view, it issues a warning:
cleartool: Warning: Moved element with checkouts to "overview.doc";
view private data may need to be moved.
The mv command can move an element only within the same VOB. To move an element to another VOB, use the relocate command.
NOTE: The mv command does not affect the previous versions of the directory containing the element. If you set your config spec to select a previous version of the directory, you see the old name of the element.
In Attache, if the move operation would overwrite an existing writable file or directory subtree containing writable files in the workspace, a confirming query is issued. Otherwise, local files or directories corresponding to successfully renamed elements in the view are moved or renamed as well.
When you move a file element in a snapshot view, only the to/from pathnames you specify are updated in the view. If the view contains multiple copies of the element (because VOB symbolic links or hard links exist), the copies are not updated. To update the copies, you must use the update command.
If the move operation would overwrite a writable file or directory subtree containing writable files, mv renames the files to filename.renamed.
This command is for VOB-database objects. To rename or move view-private files, use an operating system command. To rename or move local files in the Attache workspace, use the Windows rename or move command in a DOS window or in the File Manager.
Identities: No special identity is required.
Locks: An error occurs if one or more of these objects are locked: VOB.
Mastership: (Replicated VOBs only) No mastership restrictions.
EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: -nc). Seethe comments reference page. Comments can be edited with chevent.
SPECIFYING THE EXISTING OBJECTS. Default: None.
SPECIFYING THE NEW LOCATION. Default: None.
The UNIX examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.
The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.
In cleartool single-command mode, cmd-context represents the UNIX shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.
NOTE: In all the examples, all directories involved must be checked out.
Rename a C-language source file from hello.c to hello_1.c.
cmd-context mv hello.c hello_1.c
Moved "hello.c" to "hello_1.c".
Move all files with a .c extension into the src directory.
cmd-context mv *.c src
Moved "cm_add.c" to "src/cm_add.c".
Moved "cm_fill.c" to "src/cm_fill.c".
Moved "convolution.c" to "src/convolution.c".
Moved "hello.c" to "src/hello.c".
Moved "hello_old.c" to "src/hello_old.c".
Moved "messages.c" to "src/messages.c".
Moved "msg.c" to "src/msg.c".
Moved "util.c" to "src/util.c".
Rename a symlink from messages.c to msg.lnk, and show the result with ls.
cmd-context mv messages.c msg.lnk
Moved "messages.c" to "msg.lnk".
cmd-context ls -long msg.lnk
symbolic link msg.lnk --> msg.c
checkout, cd, ln, ls, relocate, update
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |