博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
find命令递归查找_从命令行递归查找
阅读量:2513 次
发布时间:2019-05-11

本文共 1169 字,大约阅读时间需要 3 分钟。

find命令递归查找

Probably a dozen times a day I need to search any given project for specific code keywords.  Most of the time it's within a specific project but then there are times where I don't remember which directory or project the specific text is -- from my blog to my many Mozilla projects, I have code all over my local machine and it's oftentimes difficult to find something I need.

大概每天需要十几次,我需要在任何给定的项目中搜索特定的代码关键字。 多数情况下,它在特定项目中,但是有时我不记得特定文本在哪个目录或项目中-从我的博客到我的许多Mozilla项目,我在本地计算机上都拥有代码,而且通常很难找到我需要的东西。

Most of the time I need to open my text editor and have it do the hard work of what I'm looking for but that's probably not efficient -- a more efficient tool would come from command line and thanks to , I found the perfect command:

大多数时候,我需要打开文本编辑器并让它完成我要查找的内容,但是这可能效率不高-一个更高效的工具将来自命令行,这要归功于 ,我发现完美的命令:

# Search all ".js" files for "debounce"# Spits out file path, line number, and snippet where string appearsfind . -name "*.js" -exec grep -in -H "debounce" {} \;

The command above searches files recursively to find the desired string, outputting the source file and the text which the string occurs in!

上面的命令以递归方式搜索文件以找到所需的字符串,输出源文件和该字符串所在的文本!

翻译自:

find命令递归查找

转载地址:http://afvwd.baihongyu.com/

你可能感兴趣的文章
Pie(二分)
查看>>
Mysql 索引优化
查看>>
09湖州二模(自选模块不等式)
查看>>
Mybatis Batch 批量操作
查看>>
Ubuntu server搭建Java web服务器
查看>>
WSGI学习系列WSME
查看>>
java读取xml配置文件和properties配置文件
查看>>
HDU 4300 Contest 1
查看>>
POJ 3311
查看>>
Button MouseEvent颜色变化
查看>>
Volist标签
查看>>
浅谈模块化
查看>>
14个免费访客行为分析工具
查看>>
beego orm关联查询之多对多(m2m)
查看>>
(转)arguments.callee移除AS3匿名函数的侦听
查看>>
onNewIntent调用时机
查看>>
MYSQL GTID使用运维介绍(转)
查看>>
Fail to start neutron-server
查看>>
景安快运挂在磁盘-支持宝塔
查看>>
word中交叉引用不能更新的解决方法
查看>>