On 7/7/25 10:46, zhaiyn wrote:
Because I do not have the ability to write in English, the following content is 
in Chinese. Sorry!


出现错误的内容链接: 
https://www.gnu.org/software/findutils/manual/html_node/find_html/Finding-the-Shallowest-Instance.html 
在该文中,示例代码是这样写的:


  find repo/ \
  -exec test -d {}/.svn \; -or \
  -exec test -d {}/.git \; -or \
  -exec test -d {}/CVS \; -print -prune


这是错误的,它不能实现正文中描述的功能,原因是: -or 的优选级低于 -and .
正确的代码应该如下:


find repo/ \
  \( -exec test -d {}/.svn \; -or \
  -exec test -d {}/.git \; -or \
  -exec test -d {}/CVS \; \)  -print -prune


如果的这个错误报告得到确认,请回复告知我,这会让我有一些成就感,谢谢!

Thanks for the report.

This is a duplicate of https://sv.gnu.org/bugs/?62259
which is already fixed in the Git repository (although there is now new release
for it yet):

https://cgit.git.savannah.gnu.org/cgit/findutils.git/commit/?id=45530ee875e832c9691

Have a nice day,
Berny

Reply via email to