/B: Matches pattern if at the beginning of a line.

/E: Matches pattern if at the end of a line.

/L: Uses search strings literally.

/R: Uses search strings as regular expressions.

/S: Searches for matching files in the current directory and all subdirectories.

/I: Specifies that the search is not to be case-sensitive.

/X: Prints lines that match exactly.

/V: Prints only lines that do not contain a match.

/N: Prints the line number before each line that matches.

/M: Prints only the filename if a file contains a match.

/O: Prints character offset before each matching line.

/P: Skip files with non-printable characters

/A:attr: Specifies color attribute with two hex digits. See "color /?"

/F:file: Reads file list from the specified file (/ stands for console).

/C:string: Uses specified string as a literal search string.

/G:file: Gets search strings from the specified file (/ stands for console).

/D:dir: Search a semicolon delimited list of directories

strings: Text to be searched for.

[drive:][path]filename: Specifies a file or files to search.

-?: Display program description.

Use spaces to separate multiple search strings unless the argument is prefixed with /C. For example, 'FINDSTR "hello there" x.y' searches for "hello" or "there" in file x.y. 'FINDSTR /C:"hello there" x.y' searches for "hello there" in file x.y.

Regular expression reference:

. Wildcard: any character

*Repeat: zero or more occurrence of previous character or class

^Line position: beginning of line

$ Line position: end of line

Cisco Support Tools 1.0 User Guide

How to Use the Findstr Utility 226

Page 226
Image 226
Cisco Systems 1.0 (1) manual $ Line position end of line