How to search contents of multiple pdf files?

后端 未结 13 1116
误落风尘
误落风尘 2020-11-30 15:58

How could I search the contents of PDF files in a directory/subdirectory? I am looking for some command line tools. It seems that grep can\'t search PDF files.<

13条回答
  •  [愿得一人]
    2020-11-30 16:52

    If You want to see file names with pdftotext use following command:

    find . -name '*.pdf' -exec echo {} \; -exec pdftotext {} - \; | grep "pattern\|pdf" 
    

提交回复
热议问题