3

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?

  • 1
    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
  • 1
    @Glutanimate, here's a thread specific to .odt files: ubuntuforums.org/showthread.php?t=899179. Recoll wants to pull in lot of qt dependencies. – user25656 Jan 22 '14 at 6:48
2

Finally I resolved to using Recoll. It does a good job at finding information in files. Indexing is however slow and takes a lot of 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.

  • The "refresh index" option seems to be smart - building index on some 1250 files took a few dozen seconds, but after adding only 1 new file the refresh was instantaneous. It helps to just index your ~/Documents (or wherever you keep what you want to search), instead of the home directory (hidden configs?), or even the whole filesystem etc. – Tomasz Gandor Jul 16 '17 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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