Page 1 of 1

How do I use search function in Mint 12?

Posted: Fri May 04, 2012 4:26 am
by Konstellation
I wanna search for specific keywords in a file. How do I do that? Is there even such function? I only see a search bar but I don't see anything like "search by criteria" or something.

Re: How do I use search function in Mint 12?

Posted: Fri May 04, 2012 6:50 am
by veggen
Honestly, I never managed to fully understand how's searching in Gnome supposed to work. Instead, I'd always use grep for that.
grep is a command line tool for searching withing files. You'll easily find millions of usage examples on the net, but here's a few to get you started:

Code: Select all

grep "search phrase" /path/to/file
will find lines containing "search phrase" in the specified file

Code: Select all

grep -i "search phrase" /path/to/file
the same as above, but case insensitive

Code: Select all

grep -r "search phrase" /path/to/folder
will list matching lines in any file withing the given folder

Code: Select all

grep -l -r "search phrase" /path/to/folder
will list only the names of the files containing the search phrase

In addition, keep in mind that, as with any other standard Linux command, you can chain grep with another grep or something else (find, wc, sed or whatever).

Now, let's hope someone gives an actual answer on how to use the provided feature in Gnome.

Re: How do I use search function in Mint 12?

Posted: Sun May 06, 2012 10:19 pm
by Konstellation
Thanks for the suggestion.
Need a file searching program. I need one that has the functionalities like Windows built-in Find / Search, eg. find by filename, file type, date, size, folder location, etc. & must be able to look for certain keywords within a file. I installed Recoll, but
seems to be too complicated for me. I really don't like using commands. Is there another file searching program out there that's easy to use?