Searching PDF files with pdfgrep


Most people who are familiar with Unix-like systems are aware that the grep utility can search many text files for a particular string using regular expressions. For instance, the command

$ grep function_name *.cc *.h
searches all of the C++ source (.cc) and header (.h) files in the current directory for the string “function_name,”

$ grep -E '\\todo' *.cc *.h
searches the same files for “\todo,” and

$ grep -E '^class' *.cc *.h
searches the same files for lines that begin with the keyword, “class.”

Suppose you are writing a research paper or a proposal. In the process of preparing to write, you read and skimmed many articles in PDF format. Unless you kept very careful notes while you were reading—or you have an exceptionally detailed memory—you will probably have trouble finding certain details from the papers that you read. Google is often not terribly helpful in this situation and skimming through the articles again can be very time-consuming.  Luckily, if you have saved the relevant PDFs to your computer’s hard drive, you can search through the files with a single command using pdfgrep. Unlike regular grep, pdfgrep is typically not installed by default. To install on a Debian-based GNU/Linux distribution, simply use

$ sudo apt-get install pdfgrep
Then search your PDFs. See the manual page for details.

Examples:

$ pdfgrep 'tidal dwarf' *.pdf
searches all of the PDF files in the current directory for the string “tidal dwarf,” while

$ pdfgrep 'clumpy dust' */*.pdf
searches all of the PDF files contained in sub-directories of the current directory for “clumpy dust.”

Yes, there are other tools that can be used to organize PDFs, but pdfgrep is very convenient. You don’t even have to rename your PDFs when you download them from a website. You can even search your web browser’s cache directory or your download folder.


18 Responses to “Searching PDF files with pdfgrep”

  1. Bliss Hosting Co Says:

    Wow…. vet great blog structure here. How long have you ever been running a blog ?? You made blogging easy. The look of your website is really nice and good and the content material also.

  2. Robert Says:

    It has become a customary in the corporate, political, and administrative offices to use a high quality software that can handle high fidelity document to PDF conversion with perfection, as it helps avoiding the risks of tampering with the sensitive data and information. Moreover, attaching PDF file has become a part of email ethics.

  3. Adlib Says:

    Does it work for all types of PDFs ?

  4. rushe essays Says:

    Education is useful in helping people to attain the meaning of their life. People who are illiterate are having no basic purpose in their life. Education makes us to realize the meaning of life and its purpose.

  5. best-d?ssertat?ons Says:

    Education fills our minds with knowledge, information. As we say that empty mind is the home of devil. Education do not make our minds empty. It always helps to fill our mind. Education plays a very important role on all the spheres of life.

  6. Akash Says:

    All tips are working very well.

  7. ranvj Says:

    nice list of pdf submission sites

  8. email qna Says:

    Thank you for sharing! This is very helpful for me.
    email login

  9. https://wanju-kropanma.blogspot.com Says:

    Thanks for sharing your thoughts about Nathaniel. Regards

  10. https://condor-London.blogspot.com Says:

    What’s up to every body, it’s my first go to see of this webpage; this weblog carries amazing and truly fine
    material designed for readers.

  11. https://won-ju-krmassage.blogspot.com Says:

    In fact when someone doesn’t be aware of then its up to other visitors that they

    will help, so here it takes place.

  12. ??????? Says:

    If you are going for finest contents like I do, only go to see this web page everyday because it presents feature contents, thanks

  13. ??? ?? ? ?? Says:

    I visit day-to-day a few web sites and blogs to read content, however this website presents feature based posts.

  14. ??? ??? ?? Says:

    Excellent items from you, man. I’ve be aware your stuff previous to and you’re
    simply too excellent. I really like what you’ve obtained right here, certainly like what you’re stating and the way during which you say it.
    You are making it enjoyable and you continue
    to take care of to keep it smart. I cant wait to learn much more from you.
    This is actually a tremendous website.

  15. ?? ?? Says:

    I savor, cause I discovered just what I was looking
    for. You have ended my four day lengthy hunt! God Bless you man. Have a great day.
    Bye

  16. ??? 3? Says:

    Hi there colleagues, how is everything, and what you desire to say
    regarding this post, in my view its truly awesome designed for me.

  17. ??? ?? ?? Says:

    Hi, the whole thing is going nicely here and ofcourse every one is sharing facts, that’s actually
    good, keep up writing.

  18. ?? ?? Says:

    What’s up Dear, are you truly visiting this web page regularly,
    if so afterward you will without doubt obtain pleasant experience.

Leave a Reply