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
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.