###目的###
LINUX中,find结合grep正则表达式快速查找代码。

例如经常有需求:
查找当前目录下所有.h文件中,"public开头,中间任意字符,以VideoFrameReceiver结束" 的文件名。
find . -iname "*.h" -type f | xargs grep --color -n ".*public.*VideoFrameReceiver.*"

例如输出:
./components/mirroring/browser/single_client_video_capture_host.h:36: public media::VideoFrameReceiver {
./media/capture/video/mock_video_frame_receiver.h:13:class MockVideoFrameReceiver : public VideoFrameReceiver {
./media/capture/video/video_frame_receiver_on_task_runner.h:19: : public VideoFrameReceiver {
./services/video_capture/receiver_mojo_to_media_adapter.h:16:class ReceiverMojoToMediaAdapter : public media::VideoFrameReceiver {
./content/browser/renderer_host/media/video_capture_controller.h:40: : public media::VideoFrameReceiver,

###完毕###

LINUX中,find结合grep正则表达式,快速查找代码文件。的更多相关文章

  1. linux通过grep根据关键字查找日志文件上下文

    linux通过grep根据关键字查找日志文件上下文 1.在标准unix/linux下的grep命令中,通过以下参数控制上下文的显示: grep -C 10 keyword catalina.out 显 ...

  2. [转帖]Linux教程(13)- Linux中的通配符和正则表达式

    Linux教程(13)- Linux中的通配符和正则表达式 2018-08-22 06:16:44 钱婷婷 阅读数 39更多 分类专栏: Linux教程与操作 Linux教程与使用   版权声明:本文 ...

  3. Linux中生成Core Dump系统异常信息记录文件的教程

    Linux中生成Core Dump系统异常信息记录文件的教程 http://www.jb51.net/LINUXjishu/473351.html

  4. Linux中find、grep命令详细用法

    在linux下面工作,有些命令能够大大提高效率.本文就向大家介绍find.grep命令,他哥俩可以算是必会的linux命令,我几乎每天都要用到他们.本文结构如下: find命令 find命令的一般形式 ...

  5. linux中的通配符与正则表达式

    在linux中,有通配符及正则表达式,那么什么是通配符和正则表达式,什么时候用?   通配符 它是由shell解析,并且一般用于匹配文件名,实际上就是shell解释器去解析的特殊符号,linux系统通 ...

  6. 再说linux中的rm mv 遍历执行多个文件的操作: find + xagrs

    参考文章: http://cfqtyaogang.blog.163.com/blog/static/218051022011812111342203/, 这篇文章讲得很全面很详细... 包括不好理解的 ...

  7. 在 linux 中 find 和 grep 的区别??

    Linux 系统中 grep 命令是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来.grep 全称是 Global Regular Expression Print,表示全局 ...

  8. linux中三剑客之一grep命令

    目录 一:grep语法格式: 二:参数: 三:正则表达式 1.linux正则表达式 2.普通正则表达式 四:正则与grep实战案例实战: grep简介: linux 三剑客之一,文本过滤器(根据文本内 ...

  9. Java中数组Arrays.binarySearch,快速查找数组内元素位置

    在数组中查找一个元素,Arrays提供了一个方便查询的方法.Arrays.binarySearch(): 测试列子: public class MainTestArray { public stati ...

随机推荐

  1. 纯CSS实现小圆点和三角形图案

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  2. ASCII中的控制字符含义

    十进制 十六进制 控制字符 转义字符 说明 Ctrl + 下列字母 0 00 NUL \0 Null character(空字符) @ 1 01 SOH   Start of Header(标题開始) ...

  3. 安卓开发,adb shell 调试sqlite3数据库

    安卓开发,adb shell 调试sqlite3数据库 在安卓中创建了sqlite3数据库,想要调试怎么办? 通过adb shell来进行查看. 第一步,将adb加入到系统变量中. 这样就可以在命令行 ...

  4. 42.angularJS自定义服务

    转自:https://www.cnblogs.com/best/tag/Angular/ 1. 你可以创建自定义服务,链接到你的模块中: <!DOCTYPE html> <html& ...

  5. 4. idea常用快捷键设置(改为eclipse相似)

    转自:https://blog.csdn.net/loveer0/article/details/82697877 idea常用快捷键设置(改为eclipse相似) 目录 idea常用快捷键设置改为e ...

  6. Sequences of sequences

    I have focused on lists of tuples, but almost all the examples in this chapter also work with lists ...

  7. button click event in jqxgrid jqwidgets

    button click event in jqxgrid jqwidgets http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/p ...

  8. 1、Go base64编码

    package main import ( "encoding/base64" "fmt") func main() { //标准base64编码 data:= ...

  9. 错排公式 全排列函数 next_permitation(a,a+n)

    不容易系列之一 错排:3件东西分别装进3个不同的特定的袋子,如果刚好一个都没有装对,就叫做错排! 大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了! 做好“一件”事情尚且不易,若想永远 ...

  10. bzoj 2259: [Oibh]新型计算机 最短路 建模

    Code: #include<cstdio> #include<cstring> #include<algorithm> #include<queue> ...