I need to get some files that doesn't contain some string on a large folder ≃ 10M files for 22 GO of data.
I try this command on local (macOS) :
egrep -r -L -Z 'string1|string2' * | wc -l
this work well (because to the number of files I got on local I think ≃ 500) but on my server I get no output and I can't stop the execution with Ctrlc.
So my question is:
Is there a way to achieve this command on a large folder? Or, Is there another way to count the number of files that do not contains 'string1' or 'string2'?
egrep -Dskip -r ...– Feb 27 '20 at 12:03.instead of*. – Feb 27 '20 at 12:16.– Louis Brahmi Feb 27 '20 at 13:13-r/-Roptions to find files as it just creates Frankenstein calls to grep. Keep your code simple and robust and just usefindto find files andgrepto g/re/p within the files. There are big clues in the command names to their function! – Ed Morton Feb 27 '20 at 14:51