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 read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Konstellation

How do I use search function in Mint 12?

Post 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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
veggen

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

Post 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.
Konstellation

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

Post 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?
Locked

Return to “Other topics”