--help | Output a help message, giving brief details of the command options and file type support, and then exit. | help + man |
-A, --after-context number | Output number lines of context after each matching line. | help + man |
-a, --text | Treat binary files as text. | help + man |
-B, --before-context number | Output number lines of context before each matching line. | help + man |
--binary-files word | Specify how binary files are to be processed. | help + man |
--buffer-size number | Set the parameter that controls how much memory is used for buffering files that are being scanned. | help + man |
--color option | matched text color option | help |
--colour option | If this option is given without any data, it is equivalent to "--colour=auto". | help + man |
-C, --context number | Output number lines of context both before and after each matching line. | help + man |
-c, --count | Do not output individual lines from the files that are being scanned; | help + man |
-D, --devices action | If an input path is not a regular file or a directory, "action" specifies how it is to be processed. | help + man |
-d, --directories action | If an input path is a directory, "action" specifies how it is to be processed. | help + man |
-e, --regex, --regexp pattern | specify pattern (may be used more than once) | help + man |
-F, --fixed-strings | Interpret each data-matching pattern as a list of fixed strings, separated by newlines, instead of as a regular expression. | help + man |
-f, --file path | Read patterns from the file, one per line, and match them against each line of input. | help + man |
--file-list path | Read a list of files and/or directories that are to be scanned from the given file, one per line. | help + man |
--file-offsets | Instead of showing lines or parts of lines that match, show each match as an offset from the start of the file and a length, separated by a comma. | help + man |
-H, --with-filename | Force the inclusion of the filename at the start of output lines when searching a single file. | help + man |
-h, --no-filename | Suppress the output filenames when searching multiple files. | help + man |
-I | treat binary files as not matching (ignore) | help + man |
-i, --ignore-case | Ignore upper/lower case distinctions during comparisons. | help + man |
--no-jit | If the PCRE library is built with support for just-in-time compiling (which speeds up matching), pcregrep automatically makes use of this, unless it was explicitly disabled at build time. | help + man |
-l, --files-with-matches | Instead of outputting lines from the files, just output the names of the files containing lines that would have been output. | help + man |
-L, --files-without-match | Instead of outputting lines from the files, just output the names of the files that do not contain any lines that would have been output. | help + man |
--label name | This option supplies a name to be used for the standard input when file names are being output. | help + man |
--line-buffered | When this option is given, input is read and processed line by line, and the output is flushed after each write. | help + man |
--line-offsets | Instead of showing lines or parts of lines that match, show each match as a line number, the offset from the start of the line, and a length. | help + man |
--locale locale | This option specifies a locale to be used for pattern matching. | help + man |
--match-limit number | Processing some regular expression patterns can require a very large amount of memory, leading in some cases to a program crash if not enough is available. | help + man |
-M, --multiline | Allow patterns to match more than one line. | help + man |
-N, --newline type | The PCRE library supports five different conventions for indicating the ends of lines. | help + man |
-n, --line-number | Precede each output line by its line number in the file, followed by a colon for matching lines or a hyphen for context lines. | help + man |
-o, --only-matching n | Show only the part of the line that matched a pattern instead of the whole line. | help + man |
--om-separator text | Specify a separating string for multiple occurrences of -o. | help + man |
-q, --quiet | Work quietly, that is, display nothing except error messages. | help + man |
-r, --recursive | If any given path is a directory, recursively scan the files it contains, taking note of any --include and --exclude settings. | help + man |
--exclude pattern | Files (but not directories) whose names match the pattern are skipped without being processed. | help + man |
--include pattern | If any --include patterns are specified, the only files that are processed are those that match one of the patterns (and do not match an --exclude pattern). | help + man |
--exclude-dir pattern | Directories whose names match the pattern are skipped without being processed, whatever the setting of the --recursive option. | help + man |
--include-dir pattern | If any --include-dir patterns are specified, the only directories that are processed are those that match one of the patterns (and do not match an --exclude-dir pattern). | help + man |
--exclude-from path | Treat each non-empty line of the file as the data for an --exclude option. | help + man |
--include-from path | Treat each non-empty line of the file as the data for an --include option. | help + man |
-s, --no-messages | Suppress error messages about non-existent or unreadable files. | help + man |
-u, --utf-8 | Operate in UTF-8 mode. | help + man |
-V, --version | Write the version numbers of pcregrep and the PCRE library to the standard output and then exit. | help + man |
-v, --invert-match | Invert the sense of the match, so that lines which do not match any of the patterns are the ones that are found. | help + man |
-w, --word-regex, --word-regexp | Force the patterns to match only whole words. | help + man |
-x, --line-regex, --line-regexp | Force the patterns to be anchored (each must start matching at the beginning of a line) and in addition, require them to match entire lines. | help + man |
--recursion-limit number | See --match-limit above. (in the manual page but not in --help) | man |