###目的###
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. 【Henu ACM Round#24 B】Gargari and Bishops

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 如果写过n皇后问题. 肯定都知道 某个点(i,j)和它在同一条对角线上的点分别是i+j的值和i-j的值相同的点. 然后会发现选择的两 ...

  2. FZU 1980 AbOr's story

    AbOr's story Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on FZU. Original I ...

  3. 过Hard题目.周末

      # Title Editorial Acceptance Difficulty Frequency   . 65 Valid Number     12.6% Hard    . 126 Word ...

  4. [Javascript] Transduce over any Iteratable Collection

    So far we've been transducing by manually calling .reduce() on arrays, but we want to be able to tra ...

  5. leetCode解题报告5道题(七)

    题目一:Interleaving String Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2 ...

  6. 广东省知名P2P平台资料

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYXNrYmFpNjY2ODg4/font/5a6L5L2T/fontsize/400/fill/I0JBQk ...

  7. elasticsearch中的几个概念总结

    1.Geo spatial search : 地理空间搜索,可以在搜索查询中指定的某一距离内查找所要的内容.也可以返回以当前为圆心,逐渐添加圆的半径.直到找到所匹配到的内容. 參考:http://ww ...

  8. Cube Simulation zoj3429 模拟

    Description Here's a cube whose size of its 3 dimensions are all infinite. Meanwhile, there're 6 pro ...

  9. less14 颜色函数2

    less div{ // hue()色相值 z-index: hue(hsl(90,100%,50%)); //90 ////saturation()饱和度 z-index: saturation(h ...

  10. 如何配置MySQL?(三)

    要进行mysql配置,首先要找到mysql的配置向导文件,这个配置向导文件就在我们安装目录下的一个bin的子目录下. 刚才我们是选择典型安装MySQL,一般windows是默认存储在C:\Progra ...