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.

I am looking for a software that will search text in files from a folder similar to XYplorer.

Is there something similar?

share|improve this question
    
Does it have to be a GUI tool? –  Octavian Damiean Mar 8 '11 at 8:46
    
@Octavian yes it has but even there is not, it will work for me –  Santosh Linkha Mar 8 '11 at 8:55

8 Answers 8

up vote 15 down vote accepted

There is a very nice one that ships with Ubuntu out of the box.

  1. Open the Dash (Super key or the Ubuntu button) and begin typing until you find Search for Files

    enter image description here

  2. The above is for Unity, the default Desktop Environment in Ubuntu. In menu-driven environments, go to Applications -> Accessories -> Search for Files

    enter image description here

  3. Expand the Select more options section and enter the text to search for in the Contains the text: input field.

    enter image description here

Features:

  • 100% GUI
  • You can search for file names or content
  • It does look in sub-folders.

Given your scenario (no terminal commands, simple to use interface) I think theres no better option.

PS: on the Contains the text: input field the '.' character is a wildcard. To escape it you have to use '[]'. E.g.: type Contains the text: [.]myFunction to search for .myFunction

share|improve this answer
    
yup, I didn't see i could add details –  Santosh Linkha Mar 8 '11 at 13:43
1  
yes, you can... just click on "select more options" and you can have not only "Contains the Text" but also tons of other search options (date, user, file sizer, even regex expressions). I also missed this little beast for a long time... i wish it was integrated into Nautilus (kinda like F3 in Windows Explorer) –  MestreLion Mar 8 '11 at 13:53
    
this is the same as i advised earlier gnome-search-tool –  Mikl Mar 8 '11 at 14:19
    
@Octavian: Thanks for providing the screenshots! –  MestreLion Mar 9 '11 at 16:02
    
@Mikl: its the same result, the difference lies in approach on how to invoke it: your initial solution was focused on command-line invocation (or ALT+F2) and only briefly mentioned it could also be found on menu. Didnt say where, or what the program name was in the menu. Only after i post my answer you edited yours to provide the menu path and name. For newcomers, a Menu-oriented approach is always better than CLI invocation. ALT+F2 should only be used when the software is not avaliable in menu. –  MestreLion Mar 9 '11 at 16:10

use

 grep -nr <your text> .

put the text that you want to find inside the <your text>

share|improve this answer
    
does it look in sub folders –  Santosh Linkha Mar 8 '11 at 9:02
    
experimentx@workmateX:/var/www/testingzedn$ grep -nr application.ini is taking forever ... am i incorrect –  Santosh Linkha Mar 8 '11 at 9:07
    
need the dot . , it will look into the folder with the -r –  wizztjh Mar 8 '11 at 9:18
    
grep -nr application.ini . –  wizztjh Mar 8 '11 at 9:20

you can use

find . -name '*.*' -exec grep -Hn 'text to find' '{}' \;

-name '*.*' or '*.txt' (use file mask here)
'text to find' (place text you want to find here)

find . -type f -exec grep -Hn 'text to find' '{}' \;

if you want to search all files

share|improve this answer
    
For all files, do not use -name '*.*' as files do not always have an extension. Use -type f instead (for searching in all files). Replace {} by "{}", otherwise file names with whitespace in it do not get searched correctly. –  Lekensteyn Mar 8 '11 at 12:31
    
@Lekensteyn i have edited my post. but i made some test with files with whitespaces in names and no error while using {} witout quotes. –  Mikl Mar 8 '11 at 13:43
    
just tested it too and you are right, whitespace is not a problem. In some shells, the quotes might still be necessary to prevent shell expansion. From man find: "Both of these con‐ structions might need to be escaped (with a `\') or quoted to protect them from expansion by the shell." –  Lekensteyn Mar 8 '11 at 14:13

Graphical search:

in Kubuntu open Dolphin, then Edit->Find (Ctrl+F)

change from filename to Content and adjust from where to look for.

share|improve this answer

GUI (Graphical) tool:

gnome-search-tool

you can find it in Ubuntu main menu

Menu -> Accessories -> Search for Files

or run it using hot key ALT+F2

share|improve this answer
    
Just an update for newer Ubuntu versions: on Unity interface (Ubuntu 12 or superior), click on Dash Home (the first icon on toolbar), type "search" and select "Search Files" application. –  josircg Dec 9 '13 at 13:09

Regexxer will let you search text in files. Not sure what you mean by "in folders".

enter link description here

share|improve this answer

Recoll does indexing and you can do full text searches of documents and email.

share|improve this answer

I am a fan of searchmonkey (GPL, free, cross-platform, pretty light on resources and very fast).

enter image description here

share|improve this answer
    
Looks good. Will give it a try on other platforms since the top voted answer fits my bill on Ubuntu. –  Amol Gawai Aug 24 '12 at 10:18
    
Seems it does not work on 64 bit operating systems (I faced the problem on win 7 64 bit). This is deal breaker for me as I use 64 bit OSes everywhere. Looked promising though. –  Amol Gawai Aug 24 '12 at 10:25

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.