5-26 Utility Descriptions
FIND
The FIND command displays lines, within a disk file, that contain a
specified string of characters.
Syntax
FIND [/V] [/C] [/N] [/I] "string" [[drive:][path]filename[ ...]]
Options
The /C option displays only the count of lines found with the specified
string
.
The /N option displays the line number of the line found containing the
string
.
The /V option displays the lines that do not contain the string.
The /I option ignores the case of characters
The
string
argument specifies the string of characters to search for.
Double quotes are required around the string.
The
filename
argument specifies the file or group of files to search in.
The complete drive and path can be specified. Wildcard characters can
be used in the
filename
.
Examples
FIND printf junk.c
Displays each line in the file JUNK.C that contains the
string
printf.
dir | FIND DIR
Displays each line in a directory listing that contains a DIR. The
command first executes a DOS DIR command with the output piped into
the FIND command. The FIND command then displays each line that
contains the DIR
string
.