People seem to have already asked about indexing file system:
but I want to actually just index a certain working directory and be able to do that manually (so that I make sure my search is correct). Basically, I am on working a project and I need be able to search in contents quickly. I already use locate
and updatedb
commands, but those search for file names only. I am looking for similar commands but file contents.
Just in case you are wondering why I don't use tracker
also like answered in the two posts, tracker have a set of prespecified folders to search in them, and whenever you make a search, you search in all of them. What I want is to be able to search in every project separately.
You can try
recoll
, it is available in the repositories, it gives you a lot of control over the folders you want to index and search and where you want to store the index database, you can use multiple databases too, you can use the advanced search to return results from a specific folder.See some of its features here, You can run it from the command line passing the query and other control terms to it, see the short manual here. Here the full manual.
You can use ack-grep (a cli tool), it mainly useful for code projects if that's your use case.
The Silver Searcher
A code searching tool similar to
ack
, with a focus on speed.There's always google desktop - if you can bear the thought.