How do I find files that do not contain a given string pattern?

后端 未结 16 1263
半阙折子戏
半阙折子戏 2020-11-28 17:42

How do I find out the files in the current directory which do not contain the word foo (using grep)?

16条回答
  •  清酒与你
    2020-11-28 17:52

    Take a look at ack. It does the .svn exclusion for you automatically, gives you Perl regular expressions, and is a simple download of a single Perl program.

    The equivalent of what you're looking for should be, in ack:

    ack -L foo
    

提交回复
热议问题