YPCrumble
YPCrumble

Reputation: 28692

How can I find files of multiple types using an or statement?

I can't seem to find this on StackOverflow by searching. How can I find all files of type .html and .py?

I'm trying find ./ -name *.py or *.html -type f

But this is returning find: or: unknown primary or operator

Upvotes: 0

Views: 643

Answers (1)

user4890314
user4890314

Reputation:

$ find . -name '*.h' -o -name '*.cpp'.

or find . -type f \( -name "*.class" -o -name "*.sh" \)

Upvotes: 4

Related Questions