Command line to delete all ClearCase view-private files

前端 未结 9 666
眼角桃花
眼角桃花 2020-11-30 05:13

I\'m looking for a command line to remove all view-private files and directories from a ClearCase view on Windows. I have Cygwin available as well.

The script avail

9条回答
  •  星月不相逢
    2020-11-30 05:42

    I ended up using this command in Cygwin:

    cleartool ls -recurse -view_only | sed -e 's:\\:/:g' | xargs rm -r
    

    The sed is necessary to change the Windows-style paths output by cleartool into Unix-style paths. There's probably a more efficient command out there. This one throws a lot of errors, because it deletes the directory, and then any previously found view-private files underneath that directory will be not found by rm. But you get the right result in the end.

    EDIT: VonC points out that this only works with dynamic ClearCase views

提交回复
热议问题