I'm trying to find all the files that don't contain a string in the
current directory. This incantation
find . -exec grep -l "foobaz" '{}' \;
will list all the files that contain "foobaz"; however, when I try to
invert this using any one of these incantations
find . ! -exec grep -l "foobaz" '{}' \;
find . \! -exec grep -l "foobaz" '{}' \;
find . -not -exec grep -l "foobaz" '{}' \;
I get the same output. What's going on here?
I'm using a bash shell on darwin Mac OS. The "find" utility I'm using
is the GNU variety built using MacPorts.
Thanks in advance.