How would I search for text across a directory of documents?

In the unix environment, specifically Ubuntu, How would I find all writer documents that contain a word or phrase. The native .odt format is compressed so typical text tools such as grep don’t work.

If you edit a post to add information (in this case you added “In the unix environment, specifically Ubuntu” AFTER I had posted below)" it is courteous to state you have done so if it affects others.

In Windows click Start.

Type zebra in the Search box.

Choose Show more results to open a window where you can sort by name, folder etc., and also specify exactly which locations to search.

All LO files with zebra in the path, name or in the document text will appear.

This works because LO installs a small utility which sends all words to the Windows search indexer.

Google grep for a utility which searches inside files.

The original question specified a unix-like environment so the advice for Windows is not useful. Similarly it noted that grep is not useful for compressed files like ODF files.

The original post did not mention Unix. As you can see, the post was edited to add Unix after I had responded with my answer when the poster realised (s)he needed to specify Unix.

Googling grep will find zipgrep.

I did change the original question to be fore Unix only since the XP Windows search facility off ‘start’ will find words in a .odt file.

See if you have a utility named zipgrep. If you don’t, I can add it here as it is just a small shell script.

zipgrep gagged. Specific example: A directory of various chicken dishes includes some .doc and some .odt files. When looking for those recipes that require mushrooms, this was the result. I left the M or m off to avoid dealing with capital letters.

zipgrep “ushroom.
[Baked Mustard chicken.doc]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and . . .