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:
For more information on magic files, file-typing, and the search path for magic files, see the cc.magic reference page.
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.
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:
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.
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.
Copyright© 2003 Rational Software. All Rights Reserved.