Install pcregrep:
apt install pcregrep
Find all ASCII Files and show output (incl. 100 chars before/after):
pcregrep -rMoI '(.|\n){0,100}MyCustomString:(.|\n){0,100}' web/
-I treat binary files as not matching (ignore)
-r, --recursive recursively scan sub-directories
-M, --multiline run in multiline mode
-o, --only-matching=n show only the part of the line that matched
Neuen Kommentar schreiben