Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

People seem to have already asked about indexing file system:

What options are there for indexing my filesystem?

Alternatives to OS X's Spotlight?

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.

share|improve this question
    
what kind of projects are you trying to index. are they docs or code? –  binW Dec 28 '10 at 6:59

3 Answers 3

up vote 5 down vote accepted

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: http://www.lesbonscomptes.com/recoll/, You can run it from the command line passing the query and other control terms to it, see the short manual here; http://manpages.ubuntu.com/manpages/maverick/man1/recoll.1.html. The full manual is here; http://www.lesbonscomptes.com/recoll/usermanual/rcl.indexing.html.

share|improve this answer
    
That seems to be great, I will give it a try. –  Rafid Dec 28 '10 at 9:44

You can use ack-grep (a cli tool), it mainly useful for code projects if that's your use case.

share|improve this answer

There's always google desktop - if you can bear the thought.

share|improve this answer
    
Like I said in my question, I want the search to be for a specific folder, and can be manually updated. Google desktop search all the hard drive, and cannot be manually updated, so if I don't find something in it, it doesn't necessarily mean it doesn't exist, especially when it comes to programming when you are supposed to always make edits. –  Rafid Dec 28 '10 at 9:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.