Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I want something pretty simple :) App where I put a dir to search, and a string/regexp to search in the file contents recursively in that dir, and it gives a list of results.

I don't want something like 'tracker' that runs in the background and indexes things, I want something that just searches on demand like grep, given a path.

In windows I used grepWin which was pretty perfect for the purpose.

I tried KFileReplace, seems a bit awkward. Also tried the built-in Nautilus search but it seems to only look at file names?

Edit: gnome-search-tool seems more like what I'm looking for but it doesn't support regex (or it does, but just for file names).

share|improve this question
add comment

3 Answers

Searchmonkey. You can find it in universe.

Install via the software center

enter image description here

share|improve this answer
add comment

You could try regexxer, which is in the repositories. You can install it with

sudo apt-get install regexxer

Install via the software center

As noted in /usr/share/doc/regexxer/README:

The primary audience of this tool are Linux/Unix users who are tired of typing find/grep/sed/awk/perl command lines.

It seems to be just what you want, as you can search files and folders, and also search within a selected document by using the search and replace feature that uses Perl style regular expressions. (However, you can only search within text files, html and xml files, and similar file types, not pdfs or office documents.)

In summary,

  • You can specify various patterns in the pattern search box; for example, globs (*), character classes [ab] and {brace expansions} can be used to help you find your files. You can also search recursively and for hidden files, which is particularly useful.

  • You can also use various complex regex patterns in the search/replace box, and there most Perl regular expressions can be used, which you can read about by referring to the previous link. (As an aside, Perl regular expressions can also be used with command-line grep: see man grep; you would need to specify the -P option)

  • To search inside a file, or search and replace strings, you find your document with the search on the left hand side, then click the document and use the right hand side to select your search/replace pattern. Then, in the simple example shown, you can click the button to replace or replace all, then save your document.

See also my answer here where I compare the respective search options available in regexxer and searchmonkey:

enter image description here

share|improve this answer
add comment

I know for these two guis, and I never used them, so I'm not sure if they are available through apt-get. Here are the links:

http://sethoscope.net/grepui/

http://sourceforge.net/projects/jgrep/

And it seems that they are not so rich with features (judging by screenshots).

Hope this helps a bit.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.