Grep Search all files in directory for string1 AND string2

前端 未结 8 460
迷失自我
迷失自我 2020-12-31 02:22

How can I make use of grep in cygwin to find all files that contain BOTH words.

This is what I use to search all files in a directory recursively fo

8条回答
  •  失恋的感觉
    2020-12-31 02:47

    In my cygwin the given answers didn't work, but the following did:

    grep -l firststring `grep -r -l secondstring . `
    

提交回复
热议问题