I am looking for a software that will search text in files from a folder similar to XYplorer.
Is there something similar?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI am looking for a software that will search text in files from a folder similar to XYplorer.
Is there something similar?
There is a very nice one that shipped with Ubuntu out of the box until 16.04. For modern releases, read the update below!
Open the Dash (Super key or the Ubuntu button) and begin typing until you find Search for Files
The above is for Unity, the default Desktop Environment in Ubuntu. In menu-driven environments, go to Applications
-> Accessories
-> Search for Files
Expand the Select more options
section and enter the text to search for in the Contains the text:
input field.
Features:
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
UPDATE: Gnome Search Tool was unfortunately removed from Ubuntu on early 2018. For Ubuntu 18.04 onwards there's mate-search-tool
, from the mate-utils
package, that looks and behave exactly like the defunct Gnome tool:
sudo apt install mate-utils
mate-search-tool
However, its associated .desktop
launcher does not show by default in Gnome/Unity menu, but a simple edit can workaround that:
sed '/^OnlyShowIn/s/^/#/' /usr/share/applications/mate-search-tool.desktop \
> "$HOME"/.local/share/applications/mate-search-tool.desktop
use
grep -nr <your text> .
put the text that you want to find inside the <your text>
experimentx@workmateX:/var/www/testingzedn$ grep -nr application.ini
is taking forever ... am i incorrect
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
-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.
Mar 8, 2011 at 12:31
man find
: "Both of these con‐ structions might need to be escaped (with a `\') or quoted to protect them from expansion by the shell."
Mar 8, 2011 at 14:13
I am a fan of searchmonkey (GPL, free, cross-platform, pretty light on resources and very fast).
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
Regexxer will let you search text in files. Not sure what you mean by "in folders".
Graphical search:
in Kubuntu open Dolphin, then Edit->Find (Ctrl+F)
change from filename to Content and adjust from where to look for.
Recoll does indexing and you can do full text searches of documents and email.
I compared three of the suggestions in here with 64 bit 16.04 Kubuntu:
My recommendation is Recoll and I have added some installation instructions for it. For me, the default installation supported PDF (test this!), DOCX, TAR, ZIP etc.
sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
sudo apt-get install recoll antiword
recoll
First line is probably not required: it adds partner installation repository.
If you wish to add support for Outlook PST files, then you need to execute the following as well.
sudo apt-get install readpst
mkdir ~/PST
find -L ~ -name "*.pst" -print | awk "{ printf \"%s%s %s%s%s %s\\n\", \"mkdir ~/PST/\", \$1, \"; readpst -o ~/PST/\", \$1, \" -D -j 4 -r -tea -u -w\", \$1 }" > /tmp/myPstFiles
cat /tmp/myPstFiles
chmod 755 /tmp/myPstFiles
/tmp/myPstFiles
I'm really want to introduce one tool which is based on ncurses library to provide the text-based user interface. The tool called NCGREP(grep based on ncurses) is mainly for search text in the specific folder. Hope this is what you want. This source of the tool has been hosted on github.com, see more at https://github.com/ncgrep/ncgrep