I went through the answers on -
but I'm still facing some issues to find all the files in a directory which contains "String1" but not "String2".
I tried the following command, but along with the correct result, it also returns the files containing both the strings -
grep -Hrn "String1" . | grep -v -Hrn "String2"
Kindly correct my mistake.