Find files and directories with FSearch

Why FSearch?

So what makes FSearch such an excellent search tool? First and foremost, probably the speed. By default, the software starts searching as soon as you type the first letters of the search word and usually finishes displaying the matches before you complete the search term (in case you are wondering why the search button can be turned off). This instant search simply makes an additional button superfluous in the default setting.

The matches can be sorted at the top of the results list by file name, path, size, or modification time. However, the software does not support full-text searching; it only searches for the names of files and directories. If you need full-text searching, try Recoll or DocFetcher.

In the settings (Figure 3) below Database, you can include or exclude paths or hidden files and folders from the search. For example, you can use a wildcard to exclude all files with "flatpak" in their name by specifying flatpak* (Figure 4). If you are including a wildcard, a checkbox labeled One Filesystem appears after each entry (otherwise it is grayed out), which lets you exclude a network drive that may or may not be mounted in /home from the search.

Figure 4: In the settings, you can exclude entire directories or certain files from indexing (and thus from the search), if required.

You can extend the predefined filters for file types such as Folders, Files, Pictures, Documents, or Audio, with your own filters in the settings on the Search tab (Figure 5). However, the search can also be narrowed down even further in the search mask by entering ~/documents pdf, for example. If you know the file name, ~/Documents Li will find all documents with this combination of initial letters.

Figure 5: The Search tab in the Preferences dialog lets you define your own filters and associated file types for the search.

If you enable the Search in path when query contains path separators option in the Search tab, FSearch will recognize when you want to follow a path. If you enter home in the search mask, the result shows all files with home in the name. By adding the path separator to the term (e.g., home/), the software performs a path search.

The Behaviour after successfully opening a file option (Figure 1) with Minimize or Close selected from the drop-down list proves useful if you only intend to browse for a file, open it from the context menu, and then process it elsewhere.

New Operators

The developers updated the search engine in FSearch 0.2. The syntax now offers many more possibilities than before. Operators and functions can be used to specify the search term or you can extend it using wildcards. In addition, the search evaluates regular expressions, based on the Perl Compatible Regular Expressions (PCRE) library.

Like previously, FSearch interprets a space in the search term as an AND. For example, if you are looking for all occurrences relevant to AUTH in the /var directory, type /var auth. If you don't select Match case when query contains at least one upper case character (Figure 5) in the Search tab, FSearch will find both "AUTH" and "auth" (Figure 6).

Figure 6: This is where the AND operator comes into play. Because the spelling distinction is not activated, the match list also contains files with "AUTH" in their names.

You can also use the new operators to specify match criteria such as size, modification date, folder depth, extension, content type, and much more. For example, to find any MP4 file larger than 1GB, you would type

ext:mp4 size:>1gb

The program also lets you create queries with the OR and NOT operators. For example, to find all JPEG and PNG files modified last month with "cat" or "dog" in their name, type:

(cat OR dog) ext:jpg;png dm:lastmonth

On GitHub, the project explains the extended syntax and provides a couple of examples [8].


Boxdörfer provides users with a sneak peak of planned extensions and the versions in which they will be incorporated into FSearch on GitHub [9].

In the near future, he plans, among other things, to introduce live updates of the database and to use inotify to automatically detect changes to directories or files [10]. In addition, it will be possible to filter for certain file types during indexing according to properties such as file size or last change.

FSearch 0.5 is expected to support bookmarks as well as a search history, and version 0.6 is expected to show thumbnails for supported file types. An implementation for the command line is also on the roadmap. That would make it easier to write extensions for KDE's KRunner, for example.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Introduction

    This month in Linux Voice.

  • Tracked Down

    Searching for text in files or data streams is a common and important function. Ugrep tackles this task quickly, efficiently, and even interactively if needed.

  • 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.

  • Netsed

    Netsed is a small communication tool that lets users modify the content of TCP and UDP data packets on the local network.

  • Czkawka

    Czkawka helps find and remove duplicate and obsolete files to free up valuable disk space.

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