LINUX +找到目录下,但很快在文件中字 [英] linux + find word in file under directory but quickly
本文介绍了LINUX +找到目录下,但很快在文件中字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下命令
找到的/ var型的F -exec grep的参数1{} \\; -打印
使用这个命令,我可以找到在/ var下的任何文件参数1字符串
,但它对本的时间很长。
我需要其他的可能性,找到文件字符串,但更多的速度,然后我的例子
THX
耶尔
解决方案
的grep -r串
这一发现并不neccesary。
这是一个很好的链接,虽然已经过时了。
此外,我认为这属于superuser.com
I have the following command
find /var -type f -exec grep "param1" {} \; -print
With this command I can find the param1 string in any file under /var
but the time that it take for this is very long.
I need other possibility to find string in file but much more faster then my example
THX
yael
解决方案
grep -r "string"
The find is not neccesary.
This is a good link, though outdated.
Also i think this belongs in superuser.com
这篇关于LINUX +找到目录下,但很快在文件中字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文