How to search in ms word files and pdf's


 
Thread Tools Search this Thread
Operating Systems Linux How to search in ms word files and pdf's
# 1  
Old 11-04-2011
How to search in ms word files and pdf's

Hi,

Please let me know if there is a unix command or any shell script which can do a search for a text in ms-word files, pdf'd and in excel files. Please let me know if there is a solution for this challenge.

Thanks,
Kesava.
# 2  
Old 11-04-2011
strings is one utility that will search for a specific string in a file.
# 3  
Old 11-04-2011
I'm not aware of a tool that is capable of searching PDF's in UNIX but in Linux there is a tool named pdftotext which converts Portable Document Format (PDF) files to plain text then you can search for texts using any UNIX command e.g grep.
You can search for the counterpart for MS doc files.
# 4  
Old 11-05-2011
Hi.

Often such tasks are multi-step. In this case a first step might be to convert MS Word, PDF files to text, then use a member of the grep family to do the actual search.

Here are a few programs I noted after running:
Code:
man -k word

and
Code:
man -k pdf

your system may have different utilities.
Code:
antiword (1)         - show the text and images of MS Word documents
catdoc (1)           - reads MS-Word file and puts its content as plain text ...
wordview (1)         - displays text contained in MS-Word file in X window
wvWare (1)           - convert msword documents
pdftotext (1)        - Portable Document Format (PDF) to text converter (vers...
pdftk - useful tool for manipulating PDF documents
pstotext - Extract text from PostScript and PDF files

A Google search for linux convert pdf to text produces 47 million hits.

Best wishes ... cheers, drl
These 2 Users Gave Thanks to drl For This Post:
# 5  
Old 01-20-2012
You could possibly convert it to text and try grep
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting secured pdf files to pdf using acroread

Does anybody have idea of Converting secured pdf files to pdf using acroread ? ---------- Post updated at 04:49 PM ---------- Previous update was at 04:44 PM ---------- This file is not password protected. (4 Replies)
Discussion started by: Soham
4 Replies

2. Programming

Is it possible to change search inside .pdf or .doc files?

the titele was wrong ... the true one is: Is it possible to search words inside .pdf or .doc files? is it possible if i changed the word into binary combination:eek:? and this way is super too hyper huge of greatest codes i ever seen:D to read only 1 word so is there any other ways:confused:? ... (1 Reply)
Discussion started by: fwrlfo
1 Replies

3. Solaris

How to search for a word in multiple files

Hi, I want to find for a particular word which is existing in different files and folders under the parent directory. What command can I use to retrieve all the file names which is having the word. (1 Reply)
Discussion started by: rogerben
1 Replies

4. UNIX for Dummies Questions & Answers

Script to search for a particular word in files and print the word and path name

Hi, i am new to unix shell scripting and i need a script which would search for a particular word in all the files present in a directory. The output should have the word and file path name. For example: "word" "path name". Thanks for the reply in adv,:) (3 Replies)
Discussion started by: virtual_45
3 Replies

5. Shell Programming and Scripting

Search entire system for files containing certain word(s)

I am trying to create a script that will report (email and ftp results) on any file, system wide, that has the word password= in it. (and any variation of password=). Basicaly looking for any plain text passwds. I figured the easiest way would be like this...... for i in `cat find-pw.dat` do... (6 Replies)
Discussion started by: theninja
6 Replies

6. UNIX and Linux Applications

How to create PDF documents from my word files?

Hi guys, I need to create PDF documents from my word files. How do I do it? (4 Replies)
Discussion started by: Hilda Thompson
4 Replies

7. Windows & DOS: Issues & Discussions

convert pdf's to word

Does anyone know any good tools to convert a pdf to word, I can usually cut & paste without a hitch but I have a pdf that doesn't like that and surrounds text with lines as though a table or prints tables in miniscule text. It's only one pdf file so I'm reluctant to buy a product. (3 Replies)
Discussion started by: gefa
3 Replies

8. UNIX for Dummies Questions & Answers

How to search files containing a specific word in the content

Hi all, Lets say I have 3 files a.txt and b.txt and c.txt. a.txt has the following text ==================== apple is good for health b.txt has the following text ==================== apple is pomme in french c.txt has the following text ==================== orange has citric acid... (1 Reply)
Discussion started by: amjath78
1 Replies

9. UNIX for Dummies Questions & Answers

search for certain word in a files from directory

hi can i know how to get the file name of any files containing for example "abc" from a number of files in a directory? i tried "ls -ltrc | grep abc" but no resulted generated. thanks in advance. (1 Reply)
Discussion started by: legato
1 Replies
Login or Register to Ask a Question

Featured Tech Videos