Alex Rivera | Logout

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

Asked 2009-11-17T11:07:14.770
799

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

Edit
Report

1 Answer

10

You will actually need:

find .  -not  -ipath '.*svn*' -exec  grep  -H -E -o -c  "foo"  {} \; | grep :0\$
answered 2010-04-07T22:30:29.120

Your Answer