如何“剪辑”find命令的输出?
我执行以下命令:如何“剪辑”find命令的输出?
find/-type f -name fs-type -exec svnlook tree {} \; |egrep "/$"
结果是
svnlook: Can't open file '/var/lib/svn/repos/b1me/products/payone/generic/code/core/db/fs-type/format': Not a directory
svnlook: Can't open file '/var/lib/svn/repos/b1me/products/payone/generic/code/fees/db/fs-type/format': Not a directory
也许我应该让find
命令给我的路径,而不db/fs-type/format
换句话说,我要剪辑的find
输出。我怎样才能做到这一点?
首先,你可以给
find ... -not -path "*/db/*"
找到。
它不工作以下结果出现: 找到:坏选项-not 找到:路径列表谓词列表 – 2010-09-20 09:24:45
这听起来像没有一个GNU查找? (你在solaris上工作吗?) – khmarbaise 2010-09-20 09:31:07
不,我不知道? – 2010-09-20 09:38:26
这是你在找什么
find Subversion -type d -name db -exec svnlook tree {}/.. \; | egrep "/$"
您的命令已失败,因为svnlook的期望一个目录参数不是文件之一。
可能您可以提供更多关于您想要实现的细节? – khmarbaise 2010-09-20 07:44:26
1.我想找到所有的存储库.... 2.我想找到所有存储库的整个目录....注意:执行第一步超过500 repositoy的结果,所以我需要方法来执行第二步容易 – 2010-09-20 09:39:05
重复问题:http://*.com/questions/3745744/list-directory-entries-in-the-svn-repository – 2010-09-20 18:36:01