Clearcase保护-chmod + x递归地全部* .exe [英] Clearcase protect -chmod +x recursively all *.exe

查看:168
本文介绍了Clearcase保护-chmod + x递归地全部* .exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图递归地更改目录中的所有.exe文件。

在发布之前,我做了更多的挖掘,最终找到了我需要的东西。只有在任何人都可以使用这个信息的情况下,我会回答。希望这是我的新来的。

  ct find。 -all -name * .bat -print -execcleartool protect -chmod + x -file%CLEARCASE_PN%


解决方案

当您考虑 cleartool find 的手册页, cleartool find的其他示例




  • -all 通常用于相当长的搜索,尤其适用于大的vob具有悠久的历史,所以你要添加选择标准来减少时间,比如 -type f '来考虑文件。

  • -print '是没有必要的,除非您希望所有.exe的列表已更改,但打印每个元素的简单事实可能会减慢操作相当。

  • 额外的报价需要选择包含空格的文件名,但是可以使用转义符,更易读: \

  • ct doesn除非你定义了cleartool的别名(在windows中: doskey ct = cleartool $ *


    所以:

      ct find。 -all -type f -name* .bat-execcleartool protect -chmod + x -file \%CLEARCASE_PN%\


    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%""" 
    

    解决方案

    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%\""
    

    这篇关于Clearcase保护-chmod + x递归地全部* .exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆