如何使用 or 语句查找多种类型的文件?
How can I find files of multiple types using an or statement?
我似乎无法通过搜索在 Whosebug 上找到它。我怎样才能找到类型为 .html
和 .py
的所有文件?
我正在尝试find ./ -name *.py or *.html -type f
但这是返回 find: or: unknown primary or operator
$ find . -name '*.h' -o -name '*.cpp'.
或find . -type f \( -name "*.class" -o -name "*.sh" \)
我似乎无法通过搜索在 Whosebug 上找到它。我怎样才能找到类型为 .html
和 .py
的所有文件?
我正在尝试find ./ -name *.py or *.html -type f
但这是返回 find: or: unknown primary or operator
$ find . -name '*.h' -o -name '*.cpp'.
或find . -type f \( -name "*.class" -o -name "*.sh" \)