c
Find
Purpose:
Searches for a specific string
of
text
in a file
or
files.
Syntax:
find
[Iv] [/c]
[In]
"string"
[drive:][pathname]
Comments:
Find
is a filter that takes as
options
a string
(a
group
of
charac-
ters)
and a series
of
filenames. After searching
the
files given
on
the
command
line, find displays any lines it has found
that
con-
tain
the
specified string. In
your
command
line, this string
must
be
enclosed
in
double
quotation
marks.
If
you
do
not
specify a
pathname,
find takes
input
from its
standard input (usually
the
keyboard)
and displays any lines
that
contain
the
specified string.
The
switches for
fwd
are as follows:
Iv
Ic
In
Displays all lines
not
containing
the
specified string.
Prints only
the
count
of
lines that
contain
a
match
in
each
of
the
files.
Precedes
each
line by its relative line
number
in
the
file.
Note You must type
double
quotation marks
around
a string
that
already has
double
quotation marks.
Examples:
The
following
command
displays all lines from a file
named
penCil
ad
that
contain
the
string "Automatic Pencil Sharpener":
find
"Automatic
Pencil
Sharpener"
pencil.ad
The
next
command
causes
MSĀ·
DOS
to
display all names
of
the
files
on
the
disk in drive 8
that
do
not
contain
the
string "date":
dir
b:
:
find
Iv
"date"
MS-DOS Commands
571
Find
The Find switches