This question is related to
[How to use grep efficiently?](https://stackoverflow.com/questions/5200591/how-to-use-grep-efficiently)

I am trying to search for a "string" in a folder which has 8-10 million small (~2-3kb) plain text files. I need to know all the files which has "string".

At first I used this

```
grep "string"

```

That was super slow.

Then I tried

```
grep * "string" {} \; -print

```

Based on linked question, I used this 

```
 find . | xargs -0 -n1 -P8 grep -H "string"

```

I get this error:

```
xargs: argument line too long

```

Does anyone know a way to accomplish this task relatively quicker?

I run this search on a server machine which has more than 50GB of available RAM, and 14 cores of CPU. I wish somehow I could use all that processing power to run this search faster.