Вы находитесь на странице: 1из 8

ClearcaseUserCommands:

Configureuseraliases:
File:$HOME/.bashrc

File:$HOME/.cshrc

aliasct=/usr/atria/bin/cleartool
aliassv='/usr/atria/bin/cleartoolsetview'
umask022

aliasct/usr/atria/bin/cleartool
aliassv'/usr/atria/bin/cleartoolsetview'
umask022

Thisumaskwillsetthedefaultprivilegesonnewfilesanddirecotries.Defaultprotectionwillbesetsothattheusermaywritedatabutotherscanread.
Commands:
ClearCaseCommand

Description

ctver

DisplayClearcase,cleartool,db_serverandVOBdatabaseschemaversion.

ctlsvob

Listvobmounttable:
*/vob/VOBNAME.vbt/hosts/hostname/r1vob/vobs/vobstore/VOBNAME.vbspublic
*/vob/practice_vob.vbt/hosts/hostname/viewname/Vobs/vobstore/practice_vob.vbspublic

ctdumpelementorDO

PrintinternalClearcaseinfo.

ctlsview

Listallviews:
millesc_view/hosts/hostname/viewname/Views/millesc_view.vws
*username/hosts/hostname/viewname/Views/reg_view.vws

ctlsviewviewtag

Listviewpath.

ctmktagviewtagdynamicviewname CreateaviewtagorVOBtag.
nstart/hosts/node
name/home/cleardata/views/dynamic
viewname
or
ctmktagvobvobtag...
ctmkviewtaguser1_viewstgloc
viewstore

Createanewviewin"viewstore"Clearcaseserverviewmountpoint(seeYoLinuxclientorserverinstallationtutorial).
Listviewstoragelocations:ctlsstgloc

ctmkviewtagtmpA_view/hosts/node
Createanewview.
name/home/cleardata/views/tmpA_view

ctsetviewusername_view

Setcurrentviewtousername_view.

ctstartviewcommon_view

Setcurrentviewtocommon_viewwithoutstartingaClearcaseshellenvironent.Itallowsonetoview(only)thefiles.Path:
/view/common_view/vob/vobname/...

ctendviewcommon_view
ctendviewserverusername_view

DeactivateaClearcaseview.(Firstexitview)
UsefulifyougetstaleNFShandles.

ctrmviewtagtemp_view
or
ctrmviewtemp_view

Removeviewtemp_view.

cleartoolsetviewusername_view
svusername_view

SetClearcaseview.Seealiasdefinedabove.

ctpwv

Printworkingview/currentview:
Workingdirectoryview:username_view
Setview:username_view

echo$CLEARCASE_ROOT

Printcurrentviewpath.

ctlsl
ctlsvob_only

Usingcurrentview,showfiles,privatefiles,fileversionandrule.
vob_only:Listelementsandnotderivedobjects
Format:
...
versionfile.ext@@/main/2Rule:element*/main/LATEST
directoryversionDirectoyname@@/main/2Rule:element*/main/LATEST
viewprivateobjectfile2.c
...

ctlstypekindlbtypelistlabels

Listlabels

ctlsvtreeallfilename.ext

Listfileversionlabelandbuildlabel:(versiontree)
filename.ext@@/main
filename.ext@@/main/0
filename.ext@@/main/1(BUILD_1_0)
filename.ext@@/main/2(BUILD_1_1)

ctlsvtreeallpref*

Listfileversionlabelandbuildlabelforfilesbeginningwith"pref"

ctlshistory[all]fileordirectory
ctlshistoryfilename

Listfileordirectoryversionhistory.
Listeventrocordsforagivenfile.

ctcheventc'newcommentgoeshere' Changethecommentonaversionofanelement.
replaceeventeventid
Lookupeventid:ctlsheventfileorelement
ctcheventc'newcommentgoeshere' Changethecommentonalabel.
replacelbtypelabel
ctlsco
ctlscor
ctlscoavobsme
ctlscoavobscview

Listallcheckedoutfilesincurrentdirectory.
Flag"r"recusivlylooksinsubdirectories.
Listallfilescheckedouttoallviews.
Listcheckoutsinview.

ctlscheckoutl
ctlscol
ctlscorecursivemecview

Listcheckedoutfiles.
(same)
Listfilesincurrentdirectoryandsubdirectoriescheckedouttoyouincurrentview.Omitcviewtagtogetall.

ctcatcrfilename

Listconfigurationrecordforafile.

ctfind./branch'brtype(branchname)' Listfilesinbranchwithsearchnameorattribute.
print
Listfileswithlabel"LATEST"butnotLABEL_X.
ctfind./version(main/LATEST)&&\!
version(LABEL_X)'print
ctfindavobsnxnameelement
'brtype(view_name)'print
ctlsprivate
ctlspco

Listallprivatefilesincurrentview.ViewprivatefilesarefilesresidingintheClearcasefilesystembutnotunderthecontrolof
Clearcase.i.e.objectfilesasaresultofacompile.Maynotbeviewablebyothers.
Listfilescheckedouttocurrentview.

ctmklbtypencLABEL_NAME
Createalabeltobeusedlater.
ctmklbtypec"comment"LABEL_NAME
ctlstypekindlbtypeshort|sort

Listlabels.

ctdescribelfile.ext

DescribeobjectinVOB.Listsbranchandversionoffileandconfigspecusedinview.

ctdescribefileordirectory

Listfileordirectoryinformation.

ctdescribelongelement:fileordirectory Listfileordirectoryinformation.
ctdescribelongvob:/vob

Listvobinformation.

ctmklabelLABEL_NAMEfilename.ext
ctmklabelrLABEL_NAME

Applylabeltoafile.
Labelelementsindirectorytree.

ctmklabelreplaceNEW_LABEL_NAME
Applylabeltoanewerversionofthefile.
filename.ext@@/main/4
ctrmtypermallforce

Removealabelofthenamegiven.Theoption"rmall"causestheremovalofallinstancesofthelabelonallfiles/

lbtype:LABEL_NAME
ctrmtypelbtypermallLABEL_NAME

directories.Removelabeltypeandalloccurrencesofthelabel.

ctrmtypelbtype:LABEL_NAME

RemovelabelfromClearcase.Itwillnotberemovediflabelhasbeenapplied.Useoption"rmall"toremovelabelandallinstances
ofitsapplication.

ctrmtypermallbrtypebranchtype

Removebranchandallfiles/directoriesinbranchfromClearcase.Datadisposedin"lostfound".

ctfindavobsversion"lbtype(Build
Label)"print
ctfind.name'*.[hc]'element
'lbtype_sub(LABEL_NAME)'print

Printallfilesandfileversionsgoingintobuildspecified.
listall.hand.cfileswhiththegivenlabel.

ctconcfilename

CheckOutfile(RCScommand)NoComment

ctmkdirdirectoryname

Createadirectory.Checkoutparentdirectoryfirst.

ctlnssourcedirectorynamelocal
directoryname

Createasymboliclinktoadirectory.Checkoutparentdirectoryfirst.

ctmkelemcincfilename

AddfiletoClearcasecontrol.

ctrmelemfilename

RemovefilefromClearcasecontrol.Allhistoryandknowledgeoftheelementiscompletelyremoved.Bycontrast,the"ctrm"
commandwillremovethefileandnotthehistoryandthedirectorymustbecheckedoutinordertomakethischange.

ctrmelemrmfilename

RemovefilefromClearcasecontrolandremoveprivateviewfile.

ctrmelemdirectoryname/*

Removedirectory,revisionhistoryanditscontentsfromClearcasecontrol.

ctrmverfilename@@/main/LATEST
RemovelatestversioncheckedinofthefilefromClearcase.Secondexampleremovesversion22fromtheClearcasechange
or
managementsystem.Previousversionswillbeavailablefromthearchive.
ctrmverfilename
or
ctrmverfilename@@/main/22
orremovespecifedversiononmain
branch:
ctrmverforcexlabelver/main/22file
orelementname
ctrmfilename

RemovefilefromClearcaseview.Firstperformacheckout("ctco")ofthefileanddirectory.Pastversionswillbeavailablefromthe
archivealthoughnotvisibleincurrentview.Saferthan"ctrmelem"whichremovesallknowledgeofthefileoldandnew.

ctreservefilename

Lockfile.Convertunreservedcheckouttoreserved.

ctuncofilename
ctuncormfilename
ctuncheckoutfilename

UNCheckOutfile.Cancelacheckoutofafile.
Cancelacheckoutofafileandremovefilewhichwascheckedout.NotremovedfromClearcase,justviewprivatethecheckedout
fileisdeleted/cleanedup.

ctcounrncfilename

Checkoutfileeventhoughfileischeckedoutbyanother.Checkout"unreserved",mustbemergedatalatertime.

ctcheckoutunreservedfilename

Notlocked.Checkouttoread,print,etc.Sameasabovecommand.

ctcifilename

CheckInfile.(alsoctcheckinfilename)Entercomment,enter"."assolecharacteronlineandenter.

ctdiffgraprefilename&
ctdiffpredfilename
ctxdiffpredfilename

GraphicalDiff/Mergetool.
Clearcasediffbetweencurrentfileandpredecessor.
Xwindowsdiffwithpredecessor.

ctmvfilename_Afilename_B

Renameafile.Besuretocheckouttheparentdirectoryfirst.Ifmovingfiletoanewdirectory,checkoutthetargetdirectoryaswell.

ctprotectrchmod775directoryorfile
Setdirectory/file/elementprotection.
name
Configspeccommands
ctcatcs

Printrulesofcurrentview(configspec):

ctcatcstagview_tag

element*CHECKEDOUT
element*/main/LATEST

Lookattheconfigspecassociatedwithanotherview.
ctedcs

Editcurrentrulesofview(configspec):
Changefrom:
element*CHECKEDOUT
element*/main/LATEST
To:
element*BuildLabel
elementdirectory*/main/Latest
Closevi:wq
Setconfigspecforview"username_view"?[yes]

ctsetcsdefault
ctsetcscur

Resettodefaultviewrules.
Reevaluatecurrentconfigspec.

ctupdateadd_loadrules

Updateselemetsinsnapshotview.GUItool.ReevaluatesconfigspecandreselectsVOBelementstoshow.Theoption"
add_loadrules"allowsyoutoloadrulestoyourconfigspecandloadelementswhichsatisfytherules.

HelpandInformationcommands
ctmanclearcasecommand
ctmanenv_ccase

ManpageforClearcasecommand.
ListClearcaseenvironmentvariables.

ctapropossearchword

ListcommandsandmanpagesummariesforrelatedClearcasecommand.

cthelp
cthelpclearcasecommand

Helpfacility(simple).Listspossiblecommandarguments.

Tree/Branchcommands
ctlstypekindbrtype
ctlstypekindbrtypeinvob/vob/vob
name

Listallbranches.
Listallbranchesinthevobspecified.

ctfindavobsversion'brtype(branch
type)'print

FindallfilesofthespecifiedbranchnameinallmountedVOB's.Findbranchnamewiththectlstypecommand..

ctlsvtreeall*
ctlsvtreefilename
ctlsvtreegfilename

Listversiontrees(labelsandbranches)offiles(eventhosewithoutlabelsorbranches).
Listallbranchesofspecifiedfile.
LaunchGUIdisplayandshowversiontree(labelsandbranches)foragivenfile.
([PotentialPitfall]:YoumayhavetoissuethecommandexportLANG=CpriortolaunchingGUI.)

ctchtype

Changeelementtypeorrenamebranch.

ctmkbranch
ctmkbranchncbranchnamefileto
branch.cpp

Createanewbranchinversiontree.Usethecommandmkbrtypetocreatethebranchtype(name)first.Thiscommandalsochecks
outthefile.Theconfigspecneedstoincludethisbranchsofilecanbeviewed.

ctrmbranch

Removeabranchinversiontree.

ctmkbrtype
mkbrtypec"Commentgoeshere"
branch_name

Createanewbranchtypeobject.

ctmerge

Mergechanges/differencesofafilefromanotherbranch.

ctfindmerge
ctfindmerge./ftagVIEWTAGprint

Determineswhetheramergeisrequiredforafileinyourview.
Findfilesincurrentdirectorytreewhichneedtobemerged.Usethedescribecommandtoseeifbranchhasbeenmerged.Ifsoit
wilbestatedassuch.

DerivedObjectscommands
ctlsdol

Listderivedobjects.

ctrmdo

Removeaderivedobject.

ctwinkin*.o*.aexecutables

Winkinaderivedobject.

Admincommands
clearexport_ffilerdirectoryname

Createfilecvt_datawhichistheresultofarecursiveexportoffilesfromgivendirectoryname..

clearlicense

Listnumberofallowableclientconnectionsandlistwhoisholdingalicense.

clearlicensereluser

Releaselicensefromuserwhoisholdingalicense.

getcache
ctgetcachemvfs

DisplayClearcasevieworMVFScacheparameters.
Troubleshootbylistingcachemisses(Cachemissesarebad).Performthiscommandontheserveritself.

getlog

ExamineClearcaselogfiles.

hostinfo

DisplayconfigurationdataforaClearcasehost.

lock
CommandtolockaVOB,element,branch,typeobjectorstoragepool.

ctlockvob:/vob/project
ctlockbrtypeobsoletebranch
type
ctlocklbtype:LABEL_NAME
ctlockfilename.cpp
ctlocknusersuser1,user2
brtype:branchX

Lockvobforreadonlyaccess.Disablewrite,create,delete,modify
Hidebranchpermanently.
Lockcodewithgivenlabel.
Lockafilefromuse.
Lockallusersexceptuser1anduser2onbranchX

unlock
ctunlockbrtypebranchtype

UnlockaVOBobject.

lslock

Listlocks.

lsclients

Listclientlistforlisenceorregistryhostserver.

lsreplica

ListreplicasofaVOB.

mkpool

CreateormodifyVOBstoragepool.

rmpool

RemoveastoragepoolfromaVOB.

lspool

Liststoragepools.

chpool

Changethestoragepooltowhichanelementisassigned.

mkregion

RegisteranewClearcasenetworkregion.

rmregion

UnregisteraClearcasenetworkregion.

lsregion

ListClearcasenetworkregion.

mktrigger

Attachatriggertoanelement.

rmtrigger

Removetriggerfromanelement.

mktrtype

Createatriggerobject.

mkvob
ctmkvobtagVOBtagc
"comment"/vobpath

Createandregisteraversionedobjectbase.

rmvob
ctrmvob/vobpath

RemoveaVOB.

lsvob

ListofmountedVOBs.

checkvob

FixinconsistanciesbetweenVOBdatabaseandstoragepools.

protectvob

ChangeownerorgroupofaVOB.

reformatvob

UpdatetheformatofaVOB.Usecommand"ctver"tofindthecurrentVOBdatabaseschemaversion.

rmtag

RemoveaVOBtagfromastorageregistry.

complete_migration

TakeVOBoutofmigrationmode.

mount
ctmountVOBtag

ActivateaVOB.

unmount
ctumountVOBtag

DeactivateaVOB.
("ctdescribevob"toshowVOBinfo/owner)

register

CreateanentryintheVOB/viewstorageregistry.

unregister

RemoveaVOB/viewfromstorageregistry.

relocate

MoveelementsanddirectorytreesfromoneVOBtoanother.

rename

AsignanewnametoaClearcaseobject(i.e.pool,replica,label).Usemvtochangethenameofafileordirectory.

setcache
ctsetcacheviewhostcachesize1024k
ctsetcacheviewsitecachesize2m
ctsetcacheviewcachesize5m
view_tag

SetClearcasevieworMVFScacheparameters.
Setcachesizeforallviewsonserverto1024Kb.
Setcachesizeforallviewssitewideto2Mb.
setcachesizeforasinglespecifiedview.
Viewwithctlssiteinquire

mvfscache

ControlsandmonitorsMVFScaches(dynamicviewsonly).

ctlssiteinquire

Listsitewidepropertiesinthesiteconfigregistry.

setsite

Setsorunsetssitewidepropertiesinthesiteconfigregistry.

space

Viewcachesize
defaultsforWindowsclients
defaultsforchechinandcheckoutpreserve

ReportVOBdiskspaceusage.

Вам также может понравиться