Clearcase protects -chmod + x recursively all * .exe

I am trying to recursively change all .exe in a directory.

I did a bit more digging before posting and ended up finding what I needed. Will post with my answer only in case someone can use this information. Hope I'm fine.

ct find . -all -name *.bat -print -exec "cleartool protect -chmod +x -file ""%CLEARCASE_PN%""" 
+4
source share
1 answer

When you look at the cleartool find man page , and additional cleartool find examples

  • -all usually for a fairly long search, especially for a large vob with a long history, so you want to add selection criteria to reduce the time, such as " -type f ", just to view files.
  • ' -print ' is not required unless you want the list of all .exe to be changed, but the simple fact of printing each item can slow down significantly.
  • additional quotes are needed to select filenames containing spaces, but you can use the escape notation, which is more readable: \"
  • ct does not exist if you do not define an alias for cleartool (in windows: doskey ct=cleartool $* )

So:

 ct find . -all -type f -name "*.bat" -exec "cleartool protect -chmod +x -file \"%CLEARCASE_PN%\"" 
+5
source

Source: https://habr.com/ru/post/1384023/


All Articles