find命令中的-a是什么意思
find . -a -type f -a -name '*.txt'
我认为 -a 充当“&”测试之间。就像'expr1 &表达式2 &表达式3'。为什么如果我在路径和第一个表达式之间添加“-a”就可以正常工作?
find . -a -type f -a -name '*.txt'
I thought the -a acts as an "&" between tests. Like 'expr1 & expr2 & expr3'. Why does it work fine if I add a '-a' between the path and the first expression?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在路径和表达式的情况下,我猜这只是一个解析怪癖,什么也不做。
In the case of the path and the expression, I'm guessing it's just a parsing quirk that does nothing.
and 是默认值,所以我猜测
-a
会被简单地忽略,并且不会尝试一致地解析它。and is the default, so I would guess that
-a
is simply ignored and no attempt is made to parse it consistently.