Search code examples
clearcaserecover

clearcase: how to recover a directory


I'm working with clearcase in Unix.

I accidently execute a shell, which make some file in the directory: /vobs/somePath/myDir.

I execute the command below in the directory:
cleartool ls -l
And I do get some view private object files.

What I need is to recover this directory with my baseline, which has been set before. Besides, I have some uncheckin files in other paths and I don't want to check them in right now. In other words, I just want to recover the directory myDir and don't touch any other files.

How to achieve this?


Solution

  • For a dynamic view (/vobs/avob/myview/...), only private files are writable, so you can delete everything and it will only delete the private ones.

    But, if you have checked out files (which should not be deleted), or if you don't want to risk anything, you can clean just the private files with, using cleartool lsprivate:

    cd /vobs/somePath/myDir
    ct lspriv . | grep -v checkedout | xargs rm -rf