Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder with subfolders in it and many libreoffice documents (.odt).

I need to find in which one there's a particular phrase.

I tried grep -ir "search phrase here" . but it only found the search phrase in an xml file.

Is there a way to search in documents that are not plain text files?

share|improve this question
Have a look at Recoll. – Glutanimate Jun 22 '13 at 4:30
Is there a command line alternative? – To Do Jun 22 '13 at 10:09
Recoll does have a poweful CLI interface. – Glutanimate Jun 23 '13 at 1:15
@Glutanimate, here's a thread specific to .odt files: Recoll wants to pull in lot of qt dependencies. – user25656 Jan 22 '14 at 6:48
up vote 1 down vote accepted

Finally I resolved to using Recoll. It does a good job at finding information in files. Indexing is however slow and takes a lot if resources. This is not a problem if you do not run Recoll as a daemon but only update the index manually when you're not using the computer.

share|improve this answer

Your Answer


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.