LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 01: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 01:24 PM.
 
Old 11-07-2018, 02:22 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,341

Rep: Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477Reputation: 1477
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 02:40 PM.
 
Old 11-07-2018, 03:04 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 10,178
Blog Entries: 7

Rep: Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518
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, 03: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, 03:36 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 10,178
Blog Entries: 7

Rep: Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518
yes.
 
Old 11-07-2018, 03: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, 02:02 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 10,178
Blog Entries: 7

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

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, 04:15 AM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19 MATE
Posts: 6,410
Blog Entries: 2

Rep: Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082
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, 05:41 AM   #10
byebyemrgates
Member
 
Registered: Nov 2017
Location: Blue Mountains, Australia!
Distribution: Mint 18 XFCE, Ubuntu
Posts: 118

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, 05:46 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 10,178
Blog Entries: 7

Rep: Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518Reputation: 2518
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, 05:55 AM   #12
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19 MATE
Posts: 6,410
Blog Entries: 2

Rep: Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082
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, 06:56 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 10,178
Blog Entries: 7

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:33 AM
How to search contents of multiple pdf files and return the pdf's file name? Hoxygen232 Linux - Newbie 4 04-28-2013 10:39 AM
[SOLVED] search a directory and add file contents when find string j-me Linux - General 3 01-11-2013 09:54 AM
Shell script to search one file for contents of another and replace text? kmkocot Linux - Newbie 6 10-28-2011 03:09 PM
how to search files with specific contents ? sachinh Linux - Security 4 07-22-2004 09:00 AM

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

All times are GMT -5. The time now is 06:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration