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.
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.
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).
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].
Outlook
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.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
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.
News
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.