Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You are right, none of those two soution would work:</p> <pre><code> cleartool ls -rec | grep -v "Rule:" | grep -v "eclipsed" | grep -v "--&gt;" | xargs rm -v </code></pre> <p>    cleartool lsprivate | grep -v "eclipsed" | xargs rm -v</p> <p>Source: my old answer at "<a href="https://stackoverflow.com/a/7657120/6309">Command to find all view private files in the current directory recursively</a>".</p> <p>An <code>lsprivate</code> alone lists eclipsed file like any other private file:</p> <pre><code>M:\yourDynView\yourVob\aDir\&gt;ct lsprivate M:\yourDynView\yourVob\aDir\aFile.vsd M:\yourDynView\yourVob\aDir\aPrivateFile </code></pre> <p>But, an <code>lsprivate -l</code> list eclipsed file twice:</p> <pre><code>M:\yourDynView\YourVob&gt;ct lsprivate -long view private object M:\yourDynView\yourVob\aDir\aFile.vsd file element M:\yourDynView\yourVob\aDir\aFile.vsd@@ [eclipsed] view private object M:\yourDynView\yourVob\aDir\aPrivateFile </code></pre> <p>So you need three passes</p> <ul> <li>one to generate that <code>cleartool lsprivate -l</code></li> <li>one to remove any line <em>above</em> a line which contains <code>eclipsed</code></li> <li>one to read that file and delete the remaining private files listed in that file</li> </ul> <p>The second step could be (loosely tested after <a href="http://computer-programming-forum.com/11-awk/a9312d13f49f1fb8.htm" rel="nofollow noreferrer">this thread</a>)</p> <pre><code>gawk "{if ((NR!=1)&amp;&amp;($0!~/eclipsed/)) {if ($lastlin!~/eclipsed/) {print astlin};lastlin=$0} } END{print lastlin} " s </code></pre> <p>With '<code>s</code>' the file containing the result of a <code>cleartool lsprivate -l</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload