问题
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 just on case anyone can used this information. Hope that is alright I am new here.
ct find . -all -name *.bat -print -exec "cleartool protect -chmod +x -file ""%CLEARCASE_PN%"""
回答1:
When you consider the man page of cleartool find, and the additional examples of cleartool find
-all
generally for quite lengthy search, especially for large vob with a long history, so you want to add selection criteria to reduce the time, like '-type f
' to only consider files.- '
-print
' isn't necessary, except if you want the list of all .exe changed, but the simple fact to print each element can slow down the operation considerably. - the additional quotations are needed to pick filenames that contain spaces, but you can use an escape notation, more readable:
\"
- ct doesn't exist unless you define the alias for cleartool (in windows:
doskey ct=cleartool $*
)
So:
ct find . -all -type f -name "*.bat" -exec "cleartool protect -chmod +x -file \"%CLEARCASE_PN%\""
来源:https://stackoverflow.com/questions/8335455/clearcase-protect-chmod-x-recursively-all-exe