命令提示符查找文件_如何使用Windows命令提示符中的查找

命令提示符查找文件

命令提示符查找文件

Find 0

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中每个基于命令提示符的工具一样,为了有效地使用这些工具,您需要了解某些开关和参数。 这些在下面列出并说明。

  1. /v – This switch will show any lines that don’t contain the string of words you specified.

    / v –此开关将显示任何不包含您指定的单词字符串的行。
  2. /c – This switch tells the find tool to count how many lines contain your search terms.

    / c –此开关告诉查找工具计算包含搜索词的行数。
  3. /n – This switch shows the numbers that correspond with the lines.

    / n –此开关显示与行相对应的数字。
  4. /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.

除了这些开关之外,您还可以使用此工具指定两个参数。

  1. “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.

    “字符串” –字符串将是您在文档中搜索的单词。 您必须始终记住将此部分用引号引起来,否则您的命令将返回错误。

  2. 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会要求您输入文本,或者可以接受从其他命令传递来的文本。 准备结束手动文

阅读终点,创作起航,您可以撰写心得或摘录文章要点写篇博文。去创作
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值