
命令提示符查找文件

Find is another great command line tool that every Windows user should know about because it can be used to search content of files for specific strings of text.
查找是每个Windows用户都应该知道的另一个出色的命令行工具,因为它可用于搜索文件内容中的特定文本字符串。
查找的开关和参数 (Find’s Switches and Parameters)
As with every command prompt based tool in Windows, there are certain switches and parameters you will need to know in order to use the tools effectively. These are listed and explained below.
与Windows中每个基于命令提示符的工具一样,为了有效地使用这些工具,您需要了解某些开关和参数。 这些在下面列出并说明。
- /v – This switch will show any lines that don’t contain the string of words you specified. / v –此开关将显示任何不包含您指定的单词字符串的行。
- /c – This switch tells the find tool to count how many lines contain your search terms. / c –此开关告诉查找工具计算包含搜索词的行数。
- /n – This switch shows the numbers that correspond with the lines. / n –此开关显示与行相对应的数字。
- /i – This switch tells find to ignore the case of text you are searching for. / i –此开关告诉find忽略正在搜索的文本的大小写。
In addition to these switches, there are two parameters which you can specify with this tool.
除了这些开关之外,您还可以使用此工具指定两个参数。
“String” – The string will be the words you are searching for in your documents. You must always remember to keep this secrtion surrounded by quotation marks, otherwise your command will return an error.
“字符串” –字符串将是您在文档中搜索的单词。 您必须始终记住将此部分用引号引起来,否则您的命令将返回错误。
Pathname – This parameter is where you will specify the location that you want to search. This can be as broad as listing a drive or as specific as defining a single or multiple files. If you don’t specify a path, FIND will ask you for text input or may accept text piped from another command. When you are ready to end the manual text input, you can press “Ctrl + Z.” We will discuss this more later.
路径名 –此参数是您要在其中指定要搜索的位置的位置。 这可以像列出驱动器一样广泛,也可以像定义单个或多个文件一样具体。 如果您未指定路径,FIND会要求您输入文本,或者可以接受从其他命令传递来的文本。 准备结束手动文