file

Displays the element type ClearCase would use for a file

APPLICABILITY

ClearCase (cleartool subcommand)

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 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 ClearCase 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.

PERMISSIONS AND LOCKS

Permissions: No special permissions needed.

Locks: No locks apply.

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

cleartool file foo.html
foo.html: html
cleartool file -all foo.html
foo.html: html_source html web_file source text_file
cleartool file -invob \dev foo.html
foo.html: html_source

FILES

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

SEE ALSO

cc.magic, mkelem, mkeltype, type_manager



Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved.