中国服务器网
  • Linux
  • Windows
  • Ubuntu
  1. 中国服务器网
  2. find Linux操作系统
  3. 如何在Linux上查找不包含文本的文本文件?
Intereting Posts
Windowsbatch fileredirect输出 “__this_module”variables的内存分配在哪里? 如何将自定义button添加到Windows最小化/最大化/closures(x) 从cert store C#MVC获取X509Certificate的列表 如何更改Linux服务器中的MySQL表名是不区分大小写的? 如何将shell从/ bin / bash更改为/ bin / zsh? nvm:无法卸载当前活动的节点版本 用死亡后的subprocessreplace父进程 串行设备:读取8N1的作品,但写一个字节失败 硬件JPEG解压缩/ Win32 如何将Caps Lock重新映射为Control,然后禁用Linux上的Left Control? 如何获得长度超过260个字符的文件的长度? 有什么TCPvcon的模拟允许closures远程机器上的TCP连接? Shell可以识别〜而不是〜/ Documents中的文件 NGINX hashbang重写

如何在Linux上查找不包含文本的文本文件?

如何在Linux上查找不包含文本的文件? 基本上我正在寻找以下的反面

find . -print | xargs grep -iL "somestring" 

  • Windows.h没有find使用emscripten
  • Ruby 1.9.2 Find.find编码
  • Windows批处理脚本来replace一个string
  • CMake:如何在参数中用双引号调用execute_process? 又名使用CMake中的查找来计算匹配string的行
  • 用批处理查找和replace值的列表

你引用的命令具有讽刺意味的是你所描述的正是你所描述的。 测试一下!

 echo "hello" > a echo "bye" > b grep -iL BYE ab 

说只有一个。


我想你可能会迷惑-L和-l

 find . -print | xargs grep -iL "somestring" 

是相反的

 find . -print | xargs grep -il "somestring" 

顺便说一下,考虑一下

 find . -print0 | xargs -0 grep -iL "somestring" 

甚至

 grep -IRiL "somestring" . 
  • 我可以在批处理脚本中的一个“查找”命令中search多个string吗?
  • 在文件列表中find多个目录中的文件?
  • 移动名称中有空格的多个文件(Linux)
  • find命令来查找文件并连接它们
  • 蝙蝠function在文件夹和子文件夹中find一个文件,并用它做一些事情。
  • 使用命令行查找在给定date后修改的窗口上的文件
  • search文件并对每个结果运行脚本
  • AND运算符如何在FIND命令中工作?
  • 使用sed和find命令的树function
  • 优化单行find + exec命令

  • © 2017 中国服务器网
  • Topics
  •        
  • Powered by Server
  • Privacy Policy