↧
Answer by Stephen Kitt for How do I deduplicate -exec expressions in a find...
-or has lower precedence than -and (which is the default connector), so you need to explicitly increase your disjunction’s “priority”: find . -path "./dist" -prune -or \( -iname "*.js" -or -iname...
View ArticleHow do I deduplicate -exec expressions in a find command?
I have a find command that searches multiple file types using grep. For example, if want to search .js and .jsx files for the string foo, while excluding the dist directory, I'd type: find . -path...
View Article