Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-03-2008, 07:31 AM   #1
Registered: Dec 2007
Location: england
Distribution: slackware 11
Posts: 35

Rep: Reputation: 15
searching text inside .pdf/.chm files?


is there a utility like grep that will search a text string inside .pdf and .chm files?
Old 02-03-2008, 08:07 AM   #2
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, PCLinuxOS
Posts: 666

Rep: Reputation: 91
The pdftotext command which comes as part of the poppler package is useful. Use it as follows. Note the dash (-) which tells it to write to stdout.

pdftotext some_file.pdf - | grep some_word

I don't know if there is a similar program for chm files, though I see there is a package in my distro named html2text. I haven't used it, but maybe it handles chm.

For other miscellaneous formats, including binary, I find the strings command immensely valuable. It comes as part of the binutils package, which is probably installed in all distros.
Old 02-03-2008, 08:31 AM   #3
Registered: Dec 2007
Location: england
Distribution: slackware 11
Posts: 35

Original Poster
Rep: Reputation: 15
thanks Ken, ill look into those


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
searching for Text within files. waelaltaqi Linux - Software 2 06-18-2007 03:56 PM
Convert .chm to .pdf or text? Randux Slackware 10 03-12-2006 07:30 PM
Search for text inside files alaios Linux - Newbie 7 03-12-2006 10:20 AM
Searching text files by content will103 Linux - Software 1 01-24-2005 08:43 AM
searching inside text files minm Linux - Newbie 2 01-09-2005 12:56 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:42 PM.

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