I want to run find -name with multiple file types. Eg.
find -name *.h,*.cpp
Is this possible?
You can also use the -regex
utility:
find -E . -iregex ".*\.(js|jsx|html|htm)"
Remember that the regex looks at the full absolute path:
For an explanation of that regex with test cases check out: https://regex101.com/r/oY1vL2/1
-E
(as a flag BEFORE the path) enables extended (modern) regular expressions.
This is for BSD find
(Mac OSX 10.10.5)