LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-07-2018, 12:21 PM   #1
Lee Nuks
LQ Newbie
 
Registered: Oct 2018
Posts: 9

Rep: Reputation: Disabled
Search file contents, linux mint


Hi
I'm using Linux Mint 19 cinnamon.

Is there somehow I can include/enable file contents search when using the standard file browser?
Right now I use the native Nemo, but I will switch if I have to.

I installed CatFish, but I would really like to avoid using a separate program just for searching content, as it's something I usually do a lot when webcoding.
Thank you.

Last edited by Lee Nuks; 11-07-2018 at 12:24 PM.
 
Old 11-07-2018, 01:22 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I use the command line, and I just looked, and pcmanfm has a file search build it, and I did not know that until just now.

Thanks

Last edited by BW-userx; 11-07-2018 at 01:40 PM.
 
Old 11-07-2018, 02:04 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
you will need a special program to search file contents.
grep can do it, read 'man grep', esp. the -r switch.
find finds files, and can be combined with grep via its -exec switch (man find).
 
Old 11-07-2018, 02:07 PM   #4
Lee Nuks
LQ Newbie
 
Registered: Oct 2018
Posts: 9

Original Poster
Rep: Reputation: Disabled
Can't I just install and use an other file browser than Nemo?
 
Old 11-07-2018, 02:36 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
yes.
 
Old 11-07-2018, 02:42 PM   #6
Lee Nuks
LQ Newbie
 
Registered: Oct 2018
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
yes.
Ok, do you know of one that has the ability to search for file contents then?
 
Old 11-08-2018, 01:02 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
spacefm via plugin: https://github.com/IgnorantGuru/spac...ce-find-plugin
 
Old 12-06-2018, 02:51 AM   #8
byebyemrgates
Member
 
Registered: Nov 2017
Location: Blue Mountains, Australia!
Distribution: Mint 20, Ubuntu 20
Posts: 164

Rep: Reputation: Disabled
Hi there! .
I am a bit of a newbie (using Mint 18), but I have come across these issue of searching files by content and I had to thoroughly research that. Here is what I came up with, after posting questions on this forum and others:

Popular search options are no good for content search:
Searchmonkey - only searching by file name
FSearch - only searching by file name
Nemo has a good search by file name, but NOT content

Catfish - can search contents BUT only for plain text files, NOT for .odf or .doc

TO SEARCH TEXT FILES BY CONTENT REGARDLESS OF FILE TYPE: only two options exist: Docfetcher and Recoll (OR you can learn to do it in the command line)

Docfetcher - a little harder to install (need to install Java runtime); easier interface for newbie
Recoll - install in software centre, but must install helpers as well; more advanced interface

Recoll is for pros, if you are one - go for it, BUT you need to install "helpers" to search particular file types (see their documentation)

Docfetcher is my choice, absolutely love it.
Installation is a bit tedious, must install Runtime Java, then install from a .zip archive. It does not add itself to applications menu, you have to launch it from a .sh file (the "GTK2" file in the archive is what I used in Ubuntu 18 VM), and the help menu is hidden in the folder in the archive. But, once you sort it all out -
you don't have to worry about installing any "helpers" as with Recoll, it searches ALL formats
website: http://docfetcher.sourceforge.net/en/download.html
how to install java: https://www.pcsteps.com/5492-how-to-...x-mint-ubuntu/

Recoll (from software manager) - not newbie friendly, but can search contents of other formats
need to "index" (via menu) every time files change; by default searches only home directory, but can change in menu
once search the directory with particular format files, then look at "missing helpers" in the menu
to search odf, pdf and doc files:
sudo apt-get install python-libxslt1
sudo apt-get install antiword
to check if installed already: java -version

COMMMAND LINE - as an example, here is the way of searching many .odt files: (https://www.linuxquestions.org/quest...39#post5916739)
 
Old 12-06-2018, 03:15 AM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Just a note that if you are using MATE as your desktop environment then MATE Search Tool, which comes for example as default with Mint MATE, allows you to search file contents (use the "Contains the text" field).
 
Old 12-06-2018, 04:41 AM   #10
byebyemrgates
Member
 
Registered: Nov 2017
Location: Blue Mountains, Australia!
Distribution: Mint 20, Ubuntu 20
Posts: 164

Rep: Reputation: Disabled
Quote:
Originally Posted by hydrurga View Post
Just a note that if you are using MATE as your desktop environment then MATE Search Tool, which comes for example as default with Mint MATE, allows you to search file contents (use the "Contains the text" field).
thanks! do you know if that would search text files other than plain text (e.g. pdf. doc, odf)?
 
Old 12-06-2018, 04:46 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
long gone are the times i concerned myself so much with finding a GUI thingy for my needs.

find and/or grep joined in little ad-hoc scripts does the trick, every time.
 
Old 12-06-2018, 04:55 AM   #12
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by byebyemrgates View Post
thanks! do you know if that would search text files other than plain text (e.g. pdf. doc, odf)?
Ah, no. It's limited in that regard - it merely searches the file's raw contents, so it's only really suitable for plain text files.
 
Old 12-06-2018, 05:56 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ once again, grep can. or 'strings'.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
search file's contents future_computer Linux - Newbie 17 08-03-2013 03:33 AM
How to search contents of multiple pdf files and return the pdf's file name? Hoxygen232 Linux - Newbie 4 04-28-2013 09:39 AM
[SOLVED] search a directory and add file contents when find string j-me Linux - General 3 01-11-2013 08:54 AM
Shell script to search one file for contents of another and replace text? kmkocot Linux - Newbie 6 10-28-2011 02:09 PM
how to search files with specific contents ? sachinh Linux - Security 4 07-22-2004 08:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration