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

file

Displays the element type that ClearCase or ClearCase LT would use for a file

APPLICABILITY

ProductCommand type
ClearCasecleartool subcommand
ClearCase LTcleartool subcommand

Platform
UNIX
Windows

SYNOPSIS

file [ –invob pname ] [ –all ] pname...

DESCRIPTION

The file command is similar to the UNIX file(1) command, which determines the file type of a specified file. cleartool file displays the element type ClearCase or ClearCase LT would use for the specified file if the file were converted to an element.

file uses the following process to find the element type:

  1. Search magic files for the first rule that matches the file's type.

    For more information on magic files, file-typing, and the search path for magic files, see the cc.magic reference page.

  2. Compare the element types in the rule with the element types in a particular VOB.

    By default, file uses the VOB containing the view-private file. If the file is not in a VOB, the command uses the VOB containing the current working directory.

  3. Display the first element type in the rule that exists in the VOB.

    file processes the element types in the rule from left to right. (In a magic file rule, element types are listed from most to least specific.) For example, with a rule like the following:

    txt document text_file : -printable & -name "*.[tT][xX][tT]" ;

    file first looks for an element type named txt and displays it if it exists in the VOB. If txt doesn't exist in the VOB, file looks for an element type named document and displays it if it exists. If document doesn't exist, file displays the text_file element type.

For information about creating new element types in a VOB, see the mkeltype reference page.

RESTRICTIONS

None.

OPTIONS AND ARGUMENTS

–invob vob-pname
Compares the potential element types against the list of element types in the specified VOB.

–all
Skips the comparison with the list of element types in the VOB and prints every element type in the magic file rule.

EXAMPLES

Note: In the UNIX examples that follow, arguments and output that show multicomponent VOB tags are not applicable to ClearCase LT, which recognizes only single-component VOB tags. In this manual, a multicomponent VOB tag is by convention a two-component VOB tag of the form /vobs/vob-tag-leaf—for example, /vobs/src. A single-component VOB tag consists of a leaf only—for example, /src. In all other respects, the examples are valid for ClearCase LT.

  • Display the element type that would be used for a view-private HTML file.

    cleartool file foo.htmll 
    foo.htmll: html

  • List all possible element types for a view-private HTML file.

    cleartool file –all foo.htmll 
    foo.htmll: html_source html web_file source text_file

  • Display the element type that would be used if the file were converted to an element in the VOB /vobs/dev.

    cleartool file –invob /vobs/dev foo.htmll 
    foo.htmll: html_source 

  • Display the element type that would be used if the file were converted to an element in the VOB \dev.

    cleartool file –invob \dev foo.htmll 
    foo.htmll: html_source 

UNIX FILES

ccase-home-dir/config/magic/default.magic

WINDOWS FILES

ccase-home-dir\config\magic\default.magic

SPONSORED LINKS



 

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