命令行全文索引? [英] Command-line fulltext indexing?
问题描述
我们有一个巨大的,老的,可怕的代码库,使得几乎不可能找到的东西,当你需要它。我们正在努力改进它,肯定...但我经常发现自己做大量递归greps搜索文件的内容,以找到使用的地方。
有没有一个工具,我可以用来构建文本文件的目录中的全文索引,然后从命令行查询?
希望可以运行的东西用户空间,并且不需要守护程序。我们在开发服务器上有很多用户,所以我想要的东西,我可以搜索通过我的代码库的实例。
是gid(akaid-utils)的大粉丝:
使用简单:
-
使用您喜爱的软件包管理器安装id-utils (例如sudo apt-get install或yum)
-
cd到源目录的根目录并运行mkid >
-
您也可以从命令行使用它。
或任何其他工具。
We have a huge, old, horrible codebase that makes it nearly impossible to find things when you need it. We're working on improving it, sure... but I often find myself doing massive recursive greps to search through the contents of files to find where things are used.
Is there a tool I can use to build a fulltext index of text files in a directory and then query that from the command-line?
Prefer something that can be run in user-space and doesn't need a daemon. We have many users on our dev server, so I want something that I can search through my instance of the codebase.
I'm a big fan of "gid" (aka "id-utils"):
Usage is simple:
Install id-utils with your favorite package manager (e.g. "sudo apt-get install" or "yum")
"cd" to the root of a source directory and run "mkid"
You can use it from the command line
You can also use it from "vim" or any number of other tools.
这篇关于命令行全文索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!