There are search tools and then there are SEARCH TOOLS. Any Linux user that has ever needed real power for their searches generally has to resort to the command line where they can take advantage of regular expressions or scripting. But what if you could have a GUI tool that could also handle regular expressions?
There is such a tool - SearchMonkey. SearchMonkey attempts to bridge the gap between Beagle and locate/find by adding a powerful regular expression builder to a GUI searching tool. And SearchMonkey does quite well at this task.
In this article you will learn how to install SearchMonkey and use its powerful regular expression builder to power your searches.
As you have come to expect, installing SearchMonkey is simple:
Once SearchMonkey is installed you will find it in the Accessories sub-menu of the Applications menu.
When you fire up the SearchMonkey tool the main window will appear (see Figure 1) with three tabs: Basic, Advanced, and Options. For standard searching the Basic tab should be fine. You can not add regular expressions to the Basic tab. Only within the Advanced tab can you take advantage of regular expressions in your searching.
And since anyone can use a basic search GUI, let's skip right to the good stuff within the Advanced tab.
When you click on the Advanced tab you will see the regular expression builder right away (see Figure 2). As you can see you can apply regular expressions to the both the file name and the file contents. Let's walk through the process of creating a regular expression for a search. I want to search all files within /home/jlwallen for any file containing the phrase "Figure" more than once. To do this click on the Expression Builder button for the "Containing" section. When this is clicked this it will open up a new window where the expression can be built.
Here's how we build our expression. Since our expression will only apply to the contents of the files click the Expression Builder button for the "Contains" section. When the new window appears (see Figure 3) immediately go to the "Text contains" section and select "The phrase" from the drop down. In the text area immediately to the right of that drop down enter "Figure" (no quotes). Now select "One or more times" from the "Occurs" drop down. The expression is built, it now has to be added by clicking the "Add" button.
This is where the behavior gets a bit odd. After you push the Add button you have to put the OK button to add the expression to the main search window. The problem is, by pushing the OK button your default web browser will open to the SearchMonkey web page. This has nothing to do with your searching. You can close your web browser (or the tab SearcMonkey opened) without any effect to SearchMonkey. After the web page opens, go back to the SearchMonkey window and click Cancel which will take you back to the main window. Now you should see, the "Containing" section the string "(Figure)+" (no quotes). That is the expression to find all files that contain the string "Figure" (no quotes).
Click Start and you will quickly see the results pile up (given your file system contains files that match the expression.) Depending upon the size of your hard drive, the amount of files/folders on your machine, the complexity of your regular expression, and the speed of your machine the search could take some time.
That gives you an idea how SearchMonkey is used. If you're looking for a search tool that gives you far more power at your fingertips than the standard fair, SearchMonkey might be the perfect solution for you. Not only can you search your entire file system, you can create some fairly complex regular expressions to add power to your searching.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.