Find files which contains both the words using grep located in any directory.
1 min readMar 17, 2020
grep -irlZ ‘ProductsGrid’ * — exclude-dir={node_modules,dist} | xargs -0 grep -l “product_ids”
The i is for case-insensitive search.
Excluding certain folders using exclude-dir.
This command searches for files which contain both the words ‘ProductsGrid’ and ‘product_ids’ .