Filesystem Searching with Clapgrep and Recoll

Recoll as an Alternative

Recoll [8] is an alternative to Clapgrep that also features a GUI. Unlike Clapgrep, Recoll relies on an index and therefore does not have to search the filesystem on subsequent calls once the index has been created. It is a good idea to create the index at night when your computer is not in use. Even on a system with AMD Ryzen 9 7900 and 64GB RAM, indexing my home directory took almost 20 minutes.

Recoll uses the Xapian [9] open source library as a storage and retrieval engine in the background. Xapian manages the index database, processes complex queries, and calculates relevance, while Recoll (Figure 6) provides mechanisms and interfaces for indexing document content and processing and presenting various file formats.

Figure 6: Unlike Clapgrep, Recoll relies on an index, which is faster when dealing with very large file collections.

According to information available on the Internet, Recoll's index gives it a speed advantage when searching in very large directories or frequently searched file collections. I was unable to verify this on state-of-the-art hardware where I used Clapgrep and Recoll to search for the term "linux" in the /usr directory, containing just south of 34,000 files. In Recoll, I entered the expression "linux and path:/usr/" in the search line. In both cases, the result was available in less than a blink of an eye. However, Recoll is likely to have an advantage in far larger directories with millions of files.

Recoll appears to be significantly more powerful when evaluating search results. The display (Figure 7) also appears more clear-cut, delivering the results page by page. In addition to Linux, Recoll is currently available for macOS, Windows, and Android. It searches files, email attachments, and archives, which it decompresses transparently.

Figure 7: Thanks to its powerful query language and the way it processes results, Recoll is more suitable for complex searches; this is further accelerated by the use of an index.

Besides Recoll's command line or GUI, you can also use a web interface. Recoll is recommended for search queries that require complex search functions and a detailed display and evaluation of the results. It supports a powerful query language with Boolean operators, phrase search, wildcards, and filtering by file attributes such as size, date, or MIME type.

Conclusion

Clapgrep and Recoll both have their merits; neither is better than the other. However, they are intended for different types of file system searches. For occasional quick searches, Clapgrep has the edge and offers several advantages over the veteran grep and its descendants Ripgrep and ripgrep-all. When it comes to complex or repetitive searches whose results need to be evaluated based on various criteria, Recoll is the clear winner. You will also find an overview of other desktop search engines in an earlier issue of Linux Magazine [10][11].

The Author

Ferdinand Thommes lives and works as a Linux developer, freelance writer, and tour guide in Berlin.

Buy this article as PDF

Download Article PDF now with Express Checkout
Price $2.95
(incl. VAT)

Buy Linux Magazine

Related content

  • Recoll

    KDE's unofficial search engine may be the most usable choice of all.

  • Tutorials – Recoll

    Even in the age of cloud computing, personal computers often hold thousands of files: text files, spreadsheets, word processing docs, configuration files, and HTML files, as well as email and other message formats. If it takes too long to find the file you need, chase it down with the Recoll local search engine.

  • Recoll

    Whether you’re looking for a letter to the Internal Revenue Service or an email from an online trader, the Recoll desktop search machine will help you find it with just a few mouse clicks.

  • Make New Friends

    If you are looking for modern display options or more speed at the command line, these alternatives to traditional Unix commands may be just what you need.

  • agrep

    The agrep tool expands on grep by adding fuzzy search capabilities to text string-matching operations.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News