This should work:
ct find -all -ele '! lbtype_sub(LABEL_X)' -print ct find -ele '! lbtype_sub(LABEL_X)' -print
Notes:
- ct means cleartool
- Unix syntax here (for Windows, replace simple quotes with double quotes)
- beware of the space between
! and lbtype_sub (in winodws you don't need space) -ele it is very important to get only one occurrence of a given file (and not all different versions of a file that meet the criteria)
-ele restricts the search to elements rather than versions (which may lead to more results when using versions)
-all list all items included "deleted" (that is, "unreferenced"). The second line displays only visible elements (in the current view)
You must execute these two commands in a subdirectory of your choice within the given ClearCase (snapshot or dynamic view): all files inside this subdirectory (and subdirectories ...) corresponding to the sirteria will be in the list.
Warnings:
lists files and directories. If you want only files, add -type f to the request:
ct find -type f -ele '! lbtype_sub (LABEL_X) '-print
what is displayed is the extended path for the items, that is, the file name followed by @@ .
To display only the name without @@ , use ' -nxn ' (without the extended path name)
ct find -nxn -ele '!lbtype_sub(LABEL_X)' -print
Another more complex but more complete way to list a name without @@ is to use descr -fmt . For instance:
ct find . -ele "!lbtype_sub(LABEL_X)" -exec "cleartool descr -fmt \"%En %d\n\" \"%CLEARCASE_PN%\"" ct find . -ele '! lbtype_sub(LABEL_X)' -exec 'cleartool descr -fmt "%En %d\n" "$CLEARCASE_PN"'
will give you (in windows or unix syntax) the date and name of files and directories not marked as LABEL_X.
With this descr -fmt display, you can combine any information and presentation you want to receive.
source share