Close Menu
  • Analog Design
    • Latest Analog Layout Interview Questions (2025)
  • Digital Design
    • Digital Electronics Interview Question(2025)
    • Top VLSI Interview Questions
  • Physical Design
    • Physical Design Interview Questions for VLSI Engineers
  • Verilog
    • Verilog Interview Questions(2024)
  • Forum
Facebook Instagram YouTube LinkedIn WhatsApp
SiliconvlsiSiliconvlsi
Forum Questions Register in Forum Login in Forum
Facebook Instagram YouTube LinkedIn WhatsApp
  • Analog Design
    • Latest Analog Layout Interview Questions (2025)
  • Digital Design
    • Digital Electronics Interview Question(2025)
    • Top VLSI Interview Questions
  • Physical Design
    • Physical Design Interview Questions for VLSI Engineers
  • Verilog
    • Verilog Interview Questions(2024)
  • Forum
SiliconvlsiSiliconvlsi
Home»Linux»How to search word from pdf files on Linux?
Linux

How to search word from pdf files on Linux?

siliconvlsiBy siliconvlsiJanuary 19, 2024Updated:January 19, 2024No Comments2 Mins Read
Facebook Pinterest LinkedIn Email WhatsApp
Share
Facebook Twitter LinkedIn Pinterest Email

Search word from pdf files

The pdfgrep command in Linux is used to search for a specific pattern of characters in one or multiple PDF files. It’s a handy utility for filtering and displaying lines containing the desired pattern, referred to as a regular expression.

Installation  For Ubuntu/Fedora

sudo apt-get update -y
sudo apt-get install -y pdfgrep

Syntax

pdfgrep [options...] pattern [files]

Common Options:

  • -c: Count the number of matches per input file.
  • -h: Suppress the prefixing of the file name on output.
  • -i: Ignore case for matching.
  • -H: Print the file name for each match.
  • -n: Prefix each match with the number of the page where it is found.
  • -r or -R: Recursively search all files (follows symlinks with -R).

Example

To search for the pattern “func main()” in all PDF files within a directory and its subdirectories:

pdfgrep -HiR "Siliconvlsi" *

If you only want to search in the current directory (not subdirectories):

pdfgrep -i "siliconvlsi" *

Find Command

Another approach using the find command:

find /path -name '*.pdf' -exec sh -c 'pdftotext "{}" - | grep --with-filename 
--label= "{}" --color "siliconvlsi"' \;

These commands help you search for specific patterns in PDF files, providing flexibility and control over the search process.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Delete words after certain word in each line in gvim

January 28, 2024

Linux date Command

January 22, 2024

What is a Linux locate Command?

January 22, 2024
Leave A Reply Cancel Reply

Facebook X (Twitter) Instagram Pinterest Vimeo YouTube
  • About Us
  • Contact Us
  • Privacy Policy
© 2025 Siliconvlsi.

Type above and press Enter to search. Press Esc to cancel.