gpt4 book ai didi

linux - 不能使用带有更多-name参数的查找linux

转载 作者:太空宇宙 更新时间:2023-11-04 12:33:42 25 4
gpt4 key购买 nike

我正在尝试查找 *.cpp 、 *.c 和 *.h 文件,其中包含上次修改的时间和以字节为单位的大小,但以下命令没有显示任何内容...

find . -name \*.c\* -o -name \*.h -printf "%s %p %t\n"

为什么不显示任何内容?

最佳答案

您需要添加括号。

find . \( -name \*.c\* -o -name \*.h \) -printf "%s %p %t\n"

引用:https://linux.die.net/man/1/find

关于linux - 不能使用带有更多-name参数的查找linux,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42585684/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com