FIND
(find)
在文件中搜索字符串。
FIND
[/V] [/C] [/N] [/I] [/OFF[LINE]] "string"
[[drive:][path]filename[ ...]]
  /V        显示所有未包含指定字符串的行。
  /C        仅显示包含字符串的行数。
  /N        显示行号。
  /I        搜索字符串时忽略大小写。
  /OFF[LINE] 不要跳过具有脱机属性集的文件。
  "string"  指定要搜索的文字串,
  [drive:][path]filename
         
  指定要搜索的文件。
如果没有指定路径,FIND 将搜索键入的或者由另一命令产生的文字。 
★★★★★实例★★★★★:
为了显示PENCIL.AD文件包含字符串“Pencil sharpener”的所有行,输入下面的命令: 
find "Pencil Sharpener" pencil.ad
为了查找有包含在引号内的文本的字符串,你必须用引号把整个字符串括起来,另外,对于字符串内包含的每一个引号要用两个引号,如下例所示: 
find "The scientists labeled their paper ""for
discussion only."" It is not a final report." report.doc 
如果要对一组文件进行查找,则可把FIND命令与FOR一起来用。下面的命令就是用此种方法来对当前目录中扩展名为.BAT的文件进行查找;在每个要查找的文件中查找字符串“PROMPT”: 
for %f in (*.bat) do find "PROMPT" %f 
假设你要用FIND在硬盘驱动器C上查找并显示包含了字符串“CPU”的文件的名字,为此你可用管道(|)来把DIR命令的结果送给FIND,例如: 
dir c:\ /s /b | find "CPU" 
在用一管道进行重定向之前,你应在AUTOEXEC.BAT文件中设置TEMP环境变量。 
由于FIND查找区分大小写及DIR产生的输出为大写,故你一定要用大定字母来输入字符串“CPU”或在FIND中使用/I开关。
Searches
for a text string in a file or files.
FIND
[/V] [/C] [/N] [/I] [/OFF[LINE]] "string"
[[drive:][path]filename[ ...]]
  /V        
Displays all lines NOT containing the specified string.
  /C        
Displays only the count of lines containing the string.
  /N        
Displays line numbers with the displayed lines.
  /I        
Ignores the case of characters when searching
for the string.
  /OFF[LINE] Do
not skip files with offline attribute set.
  "string"   Specifies the text string to find.
  [drive:][path]filename
            
Specifies a file or files to search.
If
a path is not specified, FIND searches the text typed at the prompt or piped
from another command.