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

rmname

Removes the name of an element or VOB symbolic link from a directory version

APPLICABILITY

ProductCommand type
ClearCasecleartool subcommand
ClearCase LTcleartool subcommand

Platform
UNIX
Windows

SYNOPSIS

rm·name [ –c·omment comment | –cfi·le comment-file-pname |–cq·uery
| –cqe·ach | –nc·omment ]
[ –nco ] [ –f·orce ] pname ...

DESCRIPTION

By default, a name can be removed from a directory only if that directory is checked out and there are no checkouts for that element. rmname appends an appropriate line to the directory's checkout comment.

rmname modifies one or more checked-out directories by removing the names of elements and/or VOB symbolic links (in the manner of the UNIX unlink(2) system call). Old versions of the directories do not change; the names continue to be cataloged in the old versions.

To remove a name from a checked-in directory version, you can use the –nco option. For example, you may want to remove an old symbolic link that points to a file that has been removed.

In a snapshot view, this command implicitly executes an update operation on the affected elements.

Example: Suppose you checked out version 3 of a directory named a.dir. Only your view sees this directory version while it is checked out. The command rmname foo.c deletes the name foo.c from the checked-out version of the directory, but leaves references to foo.c in earlier versions (if any) intact. When you check in the directory, all views can access the new version 4, which does not include foo.c.

Keep the following points in mind:

  • rmname does not delete elements themselves, only references to elements. Use rmelem (very carefully) to delete elements and all their names from their VOBs.
  • Removing the last reference to an element name causes the element to be orphaned. Such elements are moved to the VOB's lost+found directory. (See the mkvob command for details.)
  • Removing the last reference to a VOB symbolic link works differently depending on whether the VOB is replicated:
    • If the VOB is unreplicated, the link object is deleted.
    • If the VOB is replicated, the link object is moved to the VOB's lost+found directory.

Undoing the rmname Command

To restore a directory entry for an element that has been removed with rmname, use the ln command to create a VOB hard link to the element's entry in any previous version of the directory. For example:

cmd-context checkout srcCheckout parent directory
cmd-context rmname src/msg.cOops!
cmd-context ln src@@/main/LATEST/msg.c src/msg.cRestore deleted name

If there are no entries for the element in any previous version of the directory, the element is orphaned; that is, moved it to its VOB's lost+found directory. You can move the element to its proper location with the cleartool mv command. (You cannot use ln to link elements that are in the lost+found directory.)

RESTRICTIONS

Identities

No special identity is required if the directory is checked out; see the checkout reference page. For –nco, you must have one of the following identities:

  • VOB owner
  • root (UNIX)
  • Member of the ClearCase administrators group (ClearCase on Windows)
  • Local administrator of the ClearCase LT server host (ClearCase LT on Windows)

Locks

An error occurs if one or more of these objects are locked: VOB.

Mastership

(Replicated VOBs only) No mastership restrictions.

Other

You cannot use the –nco option in a replicated VOB.

OPTIONS AND ARGUMENTS

Event Records and Comments

Default
–nc. Creates one or more event records, with commenting controlled by your home directory's .clearcase_profile file. 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.

Removing a Name

Default
The parent directory must be checked out and there can be no checkouts of the element.

–nco
Prompts for confirmation, then removes the name or link from the checked-in directory version that you specify.

Note: You cannot use –nco in a replicated VOB.

–f·orce
Forces the removal of the name when there is at least one checkout of the element.

Specifying the Names to Be Removed

Default
None.

pname ...
One or more pathnames, specifying the elements and/or VOB symbolic links whose names are to be removed from their parent directory. You can specify an element itself, or any of its branches or versions.

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: Examples assume that the current working directory is checked out.

  • Delete the name util.c from the current directory version.

    cmd-context  rmname util.c
    Removed "util.c". 

  • Delete the last reference to the directory element subd from the current directory version.

    cmd-context  rmname subd
    cleartool: Warning: Object "subd" no longer referenced.
    Object moved to vob lost+found as
     "subd.5a200007ed11f0d709066505efe922a8".
    Removed "subd". 

  • Delete the name hello.h from the directory version .@@\main\2.

    cmd-context  rmname –nco –force .@@\main\2\hello.h
    Removed “.@@\main\2\hello.h”.  

SPONSORED LINKS



 

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