How do I use search function in Mint 12?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

How do I use search function in Mint 12?

Postby Konstellation on Fri May 04, 2012 4:26 am

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.
Konstellation
Level 1
Level 1
 
Posts: 39
Joined: Wed May 02, 2012 4:17 am

Linux Mint is funded by ads and donations.
 

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

Postby veggen on Fri May 04, 2012 6:50 am

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.
User avatar
veggen
Level 4
Level 4
 
Posts: 401
Joined: Mon May 09, 2011 4:54 am

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

Postby Konstellation on Sun May 06, 2012 10:19 pm

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?
Konstellation
Level 1
Level 1
 
Posts: 39
Joined: Wed May 02, 2012 4:17 am


Return to Other topics

Who is online

Users browsing this forum: Google Adsense [Bot] and 4 guests