How to Perform Comprehensive File Searches in Linux

Suppose you wanted to search for mp3 files (as well as files that contain the string “mp3” in their name) on your Linux system, what would you do? It wouldn’t be a stretch to say that most of you would go for the commonly-used desktop searching techniques. For example, in case of an Ubuntu system, you would likely perform a search through Unity Dash.

Some users may also go for Nautilus search, but that wouldn’t be a system-level search, so that option is ruled out. Coming back to the Unity Dash method, you’ll observe that results would not include files that contain the string “mp3” in their name. This means that even a search through Unity Dash is not reliable in this case.

So, what other other options do you have? Try searching through the command line (using the “find” command), some would say. But unless you are a command line pro, or at-least a daily command line user, that wouldn’t be an easy way to go.

If you face problems similar to the one we have mentioned here and are looking for a solution to perform comprehensive file searches in Linux, look no further, as in this article we will discuss an easy way to do that.

Note: all the commands/instructions mentioned in this article have been tested on Ubuntu 14.04.

To do that you need to download and install an application called ANGRYSearch. According to the developer of the app, “Everyone seems to be damn content with searches that are slow, populating results as they go; or are cli based, making it difficult to comfortably make use of the results; or are heavily integrated with a file manager, often limiting search to just home; or are trying to be everything with full-text file’s content search.

With ANGRYSearch, the developer has aimed to make a Linux version of Everything Search Engine.

Before you go ahead and download/install the application itself, make sure you have installed its dependencies first. The app has a couple of dependencies, namely python3-pyqt5 and xdg-utils. The former can be installed using the following command:

And the latter is usually available by default on most Linux distributions. Still, if you need to install it for any reason, you can do that through the following command:

Once you are done with the dependency part, you can move on to the download and installation process of ANGRYSearch. The first step here is to download the latest release of the app and unpack it somewhere on your system. After that, enter the app’s directory on a command line terminal and execute the following commands:

That’s it. Now you should be able to launch ANGRYSearch from both command line (using the angrysearch command) as well through Dash.

angrysearch-logo

When the tool is launched for the first time, it requires some basic setup before it can be ready to use. A screen similar to the following will show up.

angrysearch-first-run

A good thing worth pointing out here is that the first screen itself gives you some useful information about the application such as the location of its config and database files as well some prominent features. Moving on, the first thing that you’re required to do here is to press the “Update” button.

Once you do that, a small window will launch telling you that the operation will involve crawling the file system, creating a new database, and replacing the old database (if any). You also have the option to tell the tool to ignore some directories that you don’t want it to crawl and add to its database.

angrysearch-update

There’s an option to select an icon theme as well. Once you’re all set, click the “Update” button.

After the tool is done with all the crawling and database creation work, you’ll see a window similar to the following indicating that ANGRYSearch is now ready to use.

angrysearch-ready-for-use

Now, coming back to the use-case we discussed in the beginning, here’s the list of results displayed in Unity Dash on my system.

angysearch-dash-results

And here’s what ANGRYSearch showed.

angrysearch-mp3-results

Clearly, ANGRYSearch produced far more comprehensive search results.

Diving in a bit deeper, it’s worth mentioning that the ANGRYSearch database can be set in two modes: Lite (default) and Full. When set to the former, the tool shows only the name and path of the entries, while in the Full mode, information like size and date of the last modification are also displayed. The drawback of the Full mode is that “crawling through drives takes roughly twice as long since every file and directory gets additional stats calls,” the official documentation explains.

To change the database mode, you’ll have to toggle the value of the “angrysearch_lite” variable in “~/.config/angrysearch/angrysearch.conf.”

Moving on, the application also offers three search modes: Fast, Slow, and Regex. Enabled by default, the Fast mode – the documentation says – is “extremely fast,” as no substrings are searched in this case. In the Slow mode, on the other hand, substrings are also searched.

Finally, the Regex mode – activated by the F8 key, indicated by an orange color background – is slowest because it allows you to perform very precise searches using regular expressions.

If your work involves a lot of file search operations, it’s really important that you follow a way that consumes as less of your time as possible. The solution mentioned in this article should definitely help you with that, so do give it a try.

4 comments

  1. Why install another package, other than to have another tool?

    To find all the occurrences of ‘mp3’ on the system, I run:
    “Find Files/Folders” utility
    Enter “*mp3*” in the Named field
    Enter “file:/” in the Look In field
    Check off the Include Subfolders box
    Hit the Find button
    and within couple of minutes all the files and folders on the entire system containing the string ‘mp3’ are listed.

    The procedure works for any distro that has the “Find Files/Folders” utility.

    • @dragonmouth you’re a genius when it comes to Linux. You’re definitely the go to guy

  2. Unfortunately I think the easiest way would be to type in “ls” and then “*.mp3” in my terminal, then it will show me everything with the “.mp3” extension on my system. I don’t understand why there should be a need to install YET ANOTHER program or application to do something for the user, when there’s ALREADY all these tools installed in Linux to do them! Its just a matter of the person being willing to do the “homework” and study the commands, syntax, etc for it. If you dfon’t have the time to do so?…then by all means install what you must to make your life easier, but to go out in search of these kinds of apps is kinda like feeding into the “I Need This App” feeding frenzy…..I for one use what usually comes in a Linux distro, the only things I might install (besides wallpapers of course!) are a few IDE’s for trying to learn Python and coding…..sometimes the simple stuff IS the “better” way.!

  3. I’ve been using catfish, which taps into the locate database and is quite fast. It comes installed by default in Manjaro but is also available in the main repositories of other distributions I’ve treid, such as Mint and a few others. I start a sticky instance at boot, minimize it to the task bar and use it frequently during a normal day. As Eddie G says, it’s there and I don’t have to ibuild and install anything new. It’s quite fast when an ls listing would be cumbersome. I may try ANGRYsearch (right after doing a backup) just to see if it’s faster than catfish, but that’s just to serve my overdevelped curiosity bump. :)

Comments are closed.

Sponsored Stories