Search code examples
commandclearcase

Command to find all view private files in the current directory recursively


What is the clearcase Command to find all view private files in the current directory recursively?


Solution

  • The usual commands are based on cleartool ls:

    • ct lsprivate: but it is only for dynamic views, not snapshot views
    • ct ls -rec -view_only: at least, it works in both snapshot and dynamic views

    However both list also your checked-out files.

    If you want only the private files, ie skipping the hijacked/eclipsed/checked-out and symlinks, you need to filter those out.

    In Windows, that would be:

    for /F "usebackq delims=" %i in (`cleartool ls  -rec ^| find /V "Rule:" ^| find /V "hijacked" ^| find /V "eclipsed" ^| find /V "-->"`) do @echo "%i"
    

    In Unix:

    cleartool ls -rec | grep -v "Rule:" | grep -v "hijacked" | grep -v "eclipsed" | grep -v "-->" | xargs echo