views:

64

answers:

2

I wanna find *.cs and *.cpp files through cleartool find command. But it failed.

cleartool find "M:\test_view\code" -name "*.cs *.cpp"  -print

Nothing can be found based on above even there are matched files in that folder.

How to set multiple file-name patterns ?

A: 

It lookslike cleartool wraps the unix style find utility.

If that is right you might be able to use '-or'

$ find -type f -name '*.cs' -or '*.cpp' -print
IanNorton
The cleartool find command doesn't wrap the unix style find.
VonC
seems -or does not be supported in window
Meng
+1  A: 

The query language offer some possibility for Compound queries (query || query)

But the cleartool find has none of those operators for the -name option.

The best you can do, following the cleartool wildcard syntax, is

cleartool find "M:\test_view\code" -name "*.c[sp]*" -print
VonC
All right, the documentation **is** there, it's just well hidden. I'll try to stay away from things I'm not familiar with.
MvanGeest
@MvanGeest: no problem ;) Your answer was well intentioned (I remember trying myself those same options with the `cleartool find` a few years ago), but that 'find' is really a different beast from the Gnu one.
VonC
Yes, we have to use this tip
Meng