Linux下多文件中查找内容中含某关键字文件的方法

[复制链接]
488|0
 楼主| keer_zu 发表于 2020-3-10 14:04 | 显示全部楼层 |阅读模式
假如,你想在当前目录下的所有普通文件中搜索查找包含:liehuo.net 这个词的文件,那么命令如下:

1、# find . -name \* -type f -print | xargs grep “liehuo.net”

2、#find -name 'EAI*.log' | xargs grep -l 'SBL-DAT-00565'

3、#find /opt/file/www/file2/ORD/ORD_test/ -name '*.*' | xargs grep -l '10.40.190.59:15980'

4、#find /opt/file/www/file2/ORD/ORD_test/ -name \* -type f -print | xargs grep -l '暂无筛选结果'
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1488

主题

12949

帖子

55

粉丝
快速回复 在线客服 返回列表 返回顶部