Find files which contains both the words using grep located in any directory.

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’ .

I am a Software Engineer n Tech Enthusiast . You will see me publishing articles on Javascript ,NodeJS and misc.