2010-12-20 45 views
1

我可以使用「ls -visible pname」查找'pname'下的可見元素。 但通過'find',我無法找到一種方法來查找可見元素。也就是說,'find'將始終通過配置規範列出隱藏的元素。已找到與'ls -visible pname'類似的功能

有誰知道'find'只能找到'visible'元素在特定的'pname'?

感謝

+0

我已經更新了我的答案。 – VonC 2010-12-21 07:55:49

回答

0

cleartool find也有明顯的選項,它應該返回相同的結果比cleartool ls

–vis/ible 

Includes only those elements, along with their branches and versions, that are visible (have a standard path name) in the view.

此選項已出臺了加快多的VOB搜索。

對於一個VOB,爲kolslorr建議在his answer的意見,-cview是比較合適的,我會用-nxname結合起來:

–cvi/ew 

Modifies the set of objects selected by the –element, –branch, and –version queries (if any).
- If you did not specify –version , replaces each element and branch with the version that is currently in the view. (No substitution is performed on VOB symbolic links.)
- If you did specify –version, further restricts the subset to versions that are currently in the view.

-nxname 

Removes the extended naming symbol (by default, @@) and any subsequent version ID or branch path name from the name of each selected object.
Duplicate names that result from this transformation are suppressed.
In effect, this option transforms extended names into standard operating system names; it also transforms names of branches or versions into names of elements.

有了這兩種選擇,與特定路徑兼容,你應該達到你想要的。

+0

感謝VonC,但必須使用w/-all一起使用-visible,這不能滿足我的要求來搜索特定路徑。我對嗎? – Meng 2010-12-21 02:40:14

0

cleartool人發現

http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/ct_find.htm

Note: The find command is similar to the UNIX and Linux find(1) command. Only a limited set of the standard find options are supported; the way that commands are invoked on selected objects (–exec and –ok options) differs from find(1).

要回答你的問題VonC,不,你錯了。 -visible不需要和-all一起工作,你可以使用-visible來實現你想要做的事情。

+0

cleartool>找到。 -visible -type f -print cleartool:錯誤:-visible和-nvisible只對-all或-avobs有效。 – Meng 2010-12-21 04:08:41

+0

你是對的,它需要與-all一起使用。我的aplogies。如何添加額外的選擇選項?例如-cview? – kolslorr 2010-12-21 06:44:58