Linux: Search PDF file content in a directory

1153075 pts.
Tags:
Linux
PDF
In Linux, is there a way for me to search for the contents of my PDF files in a directory? Or even a subdirectory? There has to be a command line too for this, right? I tried grep but that didn't work. Thanks so much.
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

pdfgrep can help you with that.

This example searches all .pdf files whose names begin with foo recursively in the current directory:

pdfgrep -r --include "foo*.pdf" pattern

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    Thanks for the tip Carlosdl. Pretty straight forward and simple.
    135,495 pointsBadges:
    report
  • carlosdl
    Yes, pretty neat.

    There a lot of amazing command-line tools to simplify tasks on Linux.

    There was another somehow similar question recently, asking how to compile a series of PNG files into a PDF, and there is a tool that can do that with a single command from the terminal as well.

    I'm sure doing something like that would not be that easy on Windows (or maybe there are tools, but I don't know about them).
    85,470 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: