Ubuntu – How to search recursively for a phrase in odt files

greplibreofficesearch

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?

Best Answer

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.

Related Question