Reputation: 863
I have a folder in clearcase, that contains 100+ files, some of them have labels, the others not. I need a fast way to get all labeled files only.
Right now i tried using ct ls -short path\to\folder
to list all files and then i have used ct lsvtree path\to\folder\file
to check, wether the file contains labels or not. The way i am currently using works, but it's very slow, is there a simple command to detect all the files with labels?
Upvotes: 2
Views: 910
Reputation: 1323593
The IBM page "Additional examples of the cleartool find command" has many examples, like:
cleartool find -all -element '{lbtype_sub(REL1)}' -print
That will find files with one of their versions having label REL1
.
The reverse search is "How to find elements that do NOT have a particular label"
As a quick workaround, you could:
cleartool lstype -kind lbtype -invob vob_path_and_name -short
for each one:
cleartool find -all -element '{lbtype_sub(alabel)}' -print
To quicken the all process a bit, you could group several labels togethers:
cleartool find -all -element '{lbtype_sub(alabel)||lbtype_sub(alabel2)||...}' -print
Upvotes: 2