Search code examples
findclearcase

find list of files not modified for last 30 days in clearcase


I need to find list of files which are not modified for last 30 days. This means there should be no version of the file under any branch in last 30 days. is this possible in base clearcase?


Solution

  • Try first, from the query_language and cleartool find, the syntax

    cleartool find <vobtag> -element "!{created_since(target-data-time)}" -print
    

    If that does not work, you would then have to fallback to:

    • list all files with a version created in the last 30 days
    • list all files and extract the ones which are not part of the first list.

    Regarding said first list (from "How to determine the last time a VOB was modified"), using cleartool find:

    cleartool find <vobtag> -element "{created_since(target-data-time)}" -print
    or
    cleartool find <vobtag> -version "{created_since(target-data-time)}" -print
    

    That document also mentions cleartool lshistory -minor -all ., but that unreliable as it uses local metadata that can be scrapped at any time.

    For the second list:

    cleartool find . -cview -ele -print