ClearCase Notes


The following notes are for using dynamic ClearCase views.
How to set up the “ct” alias (sh, ksh, bash):
alias ct=cleartool
How to see available views:
ct lsview [view-tag-glob-name]
How to list active views:
ct lsview [view-tag-glob-name] | awk '/^\*/ {print $2}'
How to activate a view (not Windows*):
ct setview view-tag
How to start a view (Windows-only*):
ct startview view-tag
How to see the active view tag (not Windows*):
ct pwv -short
How to see the config spec associated with the active [or other] view:
ct catcs [-tag view-tag]
How to edit the config spec associated with the active view:
ct edcs
How to get usage on all [or specific] ClearCase commands:
ct help [command-name]
example:
ct help lsco
How to get detailed help on all [or specific] ClearCase commands:
ct man [command-name]
example:
ct man lsco
How to list files and the rules that select them:
ct ls
How to list all files you’ve checked out in a directory tree:
ct lsco -me -recurse -short [root-directory-path]
How to list all files within a directory tree that have been checked into a branch:
ct find root-directory-path -version "version(.../branch-name/LATEST)" -print
How to list all files with a given label, but are not in /main/LATEST:
ct find root-directory-path -version "lbtype(label) && !version(/main/LATEST)" -print
How to mount a VOB:
ct mount root-directory-path
How to remove a label from all files in a particular subtree:
ct find root-directory-path -version "lbtype(label)" -exec 'cleartool rmlabel label $CLEARCASE_XPN'
How to rename a file:
cd containing-directory-path
ct checkout .
ct mv old-file-name new-file-name
ct checkin .
How to run the X-Windows version:
xclearcase &
How to deactivate an active view (not Windows*):
exit
How to end (unstart) a started view (Windows-only*):
ct endview view-tag
How to delete an inactive view:
ct rmview -tag view-tag
When views go bad at HNS:
login to the VOB server
ssh msatvob1
find the server process
ps -ef | grep view-tag
and kill it
kill process_id

* On Unix systems, you “activate” a view, which creates a new shell level. To deactivate, you simply exit the new shell level. On Windows, however, you “start” a view. When done, you “end” the view.
Where to get online help: