IPnom Home • Manuals • ClearCase

 Rational ClearCase Commands Reference

ClearCase Stuff:ClearCase LinksClearCase BooksClearCase Commands ReferenceClearCase ForumsClearCase News
Keyword Live Search (10 results max):
 Type in part of a ClearCase command in the search box.
 
Commands Index:
  intro
  annotate
  apropos
  catcr
  catcs
  cc.icon
  cc.magic
  cd
  chactivity
  chbl
  checkin
  checkout
  checkvob
  chevent
  chflevel
  chfolder
  chmaster
  chpool
  chproject
  chstream
  chtype
  chview
  clearaudit
  clearbug
  cleardescribe
  cleardiffbl
  cleardiff
  clearexport_ccase
  clearexport_cvs
  clearexport_pvcs
  clearexport_rcs
  clearexport_sccs
  clearexport_ssafe
  clearfsimport
  cleargetlog
  clearhistory
  clearimport
  clearjoinproj
  clearlicense
  clearmake
  clearmake.options
  clearmrgman
  clearprojexp
  clearprompt
  cleartool
  clearviewupdate
  clearvobadmin
  comments
  config_ccase
  config_spec
  cptype
  credmap
  creds
  deliver
  describe
  diffbl
  diffcr
  diff
  dospace
  edcs
  endview
  env_ccase
  events_ccase
  export_mvfs
  exports_ccase
  file
  find
  findmerge
  fmt_ccase
  getcache
  get
  getlog
  help
  hostinfo
  init_ccase
  ln
  lock
  lsactivity
  lsbl
  lscheckout
  lsclients
  lscomp
  lsdo
  lsfolder
  lshistory
  ls
  lslock
  lsmaster
  lspool
  lsprivate
  lsproject
  lsregion
  lsreplica
  lssite
  lsstgloc
  lsstream
  lstype
  lsview
  lsvob
  lsvtree
  makefile_aix
  makefile_ccase
  makefile_gnu
  makefile_pmake
  makefile_smake
  makefile_sun
  man
  merge
  mkactivity
  mkattr
  mkattype
  mkbl
  mkbranch
  mkbrtype
  mkcomp
  mkdir
  mkelem
  mkeltype
  mkfolder
  mkhlink
  mkhltype
  mklabel
  mklbtype
  mkpool
  mkproject
  mkregion
  mkstgloc
  mkstream
  mktag
  mktrigger
  mktrtype
  mkview
  mkvob
  mount_ccase
  mount
  msdostext_mode
  mvfslog
  mvfsstorage
  mvfstime
  mvfsversion
  mv
  omake
  pathnames_ccase
  permissions
  profile_ccase
  promote_server
  protect
  protectvob
  pwd
  pwv
  query_language
  quit
  rebase
  recoverview
  reformatview
  reformatvob
  register
  relocate
  rename
  reqmaster
  reserve
  rgy_backup
  rgy_check
  rgy_passwd
  rgy_switchover
  rmactivity
  rmattr
  rmbl
  rmbranch
  rmcomp
  rmdo
  rmelem
  rmfolder
  rmhlink
  rmlabel
  rmmerge
  rmname
  rmpool
  rmproject
  rmregion
  rmstgloc
  rmstream
  rmtag
  rmtrigger
  rmtype
  rmver
  rmview
  rmvob
  schedule
  schemes
  scrubber
  setactivity
  setcache
  setcs
  setplevel
  setsite
  setview
  shell
  snapshot.conf
  softbench_ccase
  space
  startview
  type_manager
  umount
  uncheckout
  unlock
  unregister
  unreserve
  update
  version_selector
  view_scrubber
  vob_restore
  vob_scrubber
  vob_sidwalk
  vob_snapshot
  vob_snapshot_setup
  wildcards_ccase
  winkin
  xclearcase
  xcleardiff
  xmldiffmrg

mv

Moves or renames an element or VOB link

APPLICABILITY

ProductCommand type
ClearCasecleartool subcommand
ClearCase LTcleartool subcommand

Platform
UNIX
Windows

SYNOPSIS

  • Rename:
    mv | move [ –c·omment comment | –cfi·le comment-file-pname |–cq·uery
    | –cqe·ach | –nc·omment ] pname target-pname

  • Move to another directory:
    mv | move [ –c·omment comment | –cfi·le comment-file-pname |–cq·uery
    | –cqe·ach | –nc·omment ] pname [ pname ... ] target-dir-pname

DESCRIPTION

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.

Moving in Snapshot Views

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.

Moving View-Private Objects

This command is for VOB-database objects. To rename or move view-private files, use an operating system command.

RESTRICTIONS

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.

Other

The following restrictions apply:

  • mv cannot be used in a UCM VOB.
  • mv cannot be used to rename a UCM component whose root directory is one level beneath the VOB's root directory.

OPTIONS AND ARGUMENTS

Event Records and Comments

Default
Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: –nc). See the comments reference page. Comments can be edited with chevent.

–c·omment comment | –cfi·le comment-file-pname |–cq·uery | –cqe·ach | –nc·omment
Overrides the default with the option you specify. See the comments reference page.

Specifying the Existing Objects

Default
None.

pname
One or more pathnames, specifying elements or VOB links. If you specify more than one pname, you must specify a directory (target-pname) as the new location.

Specifying the New Location

Default
None.

target-pname
The new location for the single element or VOB link specified by pname. Both pname and target-pname must specify locations in the same VOB. An error occurs if an object already exists at target-pname.

target-dir-pname
The pathname of an existing directory element, to which the elements or links are to be moved. This directory must be located in the same VOB as the objects being moved.

EXAMPLES

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.

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

SPONSORED LINKS



 

ClearCase Links • ClearCase Books • ClearCase Commands Reference • ClearCase Forums • ClearCase News