I am trying to figure out what's the fastest way to return all the file names whose content matches with any of multiple strings. I am using xargs for doing iterations.
$ cat ../Identifiers.list | xargs -i grep -l "{}" .
This took around 8 minutes to print all the file names. Is there a faster way?
Identifiers.list - File content below
287434
383460
633491
717255
827734
253735
635373
553888
910366
No of files in Directory - 36000
$ ls -l *.xml | wc -l
36000
grep -f
is what you're looking for.