Is there any was to delete only view private files in CC dynamic view. There are a bunch of eclipsed files and view private files in my view. I need to delete only view private files and retain checked-out and eclipsed files.
I tried following -
cleartool ls -r | grep -v eclipsed | grep -v checkedout | xargs rm -v
But looks like eclipsed files are listed twice with cleartool ls
. So it deletes eclipsed files too :(
cleartool ls -r produces two outputs for an eclipsed
file in dynamic view.
src.mk
src.mk@@ [eclipsed]
So deleting with cleartool ls -rec | grep -v "Rule:" | grep -v "eclipsed" | grep -v "-->" | xargs rm -v
deletes eclipsed files too.
You are right, none of those two soution would work:
cleartool lsprivate | grep -v "eclipsed" | xargs rm -v
Source: my old answer at "Command to find all view private files in the current directory recursively".
An
lsprivate
alone lists eclipsed file like any other private file:But, an
lsprivate -l
list eclipsed file twice:So you need three passes
cleartool lsprivate -l
eclipsed
The second step could be (loosely tested after this thread)
With '
s
' the file containing the result of acleartool lsprivate -l
.