grep -rnw “superlists.settings” -e “DJANGO_SETTINGS”
Explanation of flags:
1 2 3 4 5 |
-r, --recursive Read all files under each directory, recursively, following symbolic links only if they are on the command line. Note that if no file operand is given, grep searches the working directory. |
1 2 3 |
-n, --line-number Prefix each line of output with the 1-based line number within its input file. |
1 2 3 4 5 6 7 8 9 |
-w, --word-regexp Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore. This option has no effect if <b>-x </b>is also specified. |
1 2 3 4 5 |
Matching Control -e PATTERNS, --regexp=PATTERNS Use <i>PATTERNS</i> as the patterns. If this option is used multiple times or is combined with the <b>-f </b>(<b>--file</b>) option, search for all patterns given. This option can be used to protect a pattern beginning with “-”. |