Clearcase protect -chmod +x recursively all *.exe

自作多情 提交于 2019-12-07 08:30:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!