Ubuntu – Search document by keyword using Unity Lenses

lensessearch

Say, I have many documents in my computer and I just want to find one document which contains some specific word(s) in it. I can't even remember the type or name of the document.

I tried to achieve this with Unity (Documents & folders) lenses, but it seems Ubuntu only looking for the names (of files and folders) but not looking inside of the documents.

Please advise whether I can achieve my goal using Ubuntu or not.

Best Answer

I recommend to install and use Recoll Lens:

Recoll is a full text search desktop tool which indexes the contents of many file formats including OpenOffice, MS Office, PostScript, MP3 and other audio files, JPEG and more. Besides regular searches, Recoll also lets you perform some advanced operations like searching for the author, file size, file format as well as operators like "AND" or "OR".

Unity Recoll Lens lets you use Recoll from Dash, without having to open any additional GUI. The lens comes with a few filters like Text, Spreadsheet, Presentation, Media or Message, but for more advanced searches, you'll have to manually enter the Recoll search query. Examples: author:"john doe" metallica OR megadeth /2007 (all documents from 2007 or older) dir:/path/to/dir (filters content from /path/to/dir directory).