grep: Binary file (standard input) matches

When we want to use grep on a binary file, we’d get errors like this,

$ cat /bin/cat | grep GLIBC
Binary file (standard input) matches

We can ask grep to take binary file as a text with the parameter “-a”, which is equivalent to the –binary-files=text option,

$ cat /bin/cat | grep -a GLIBC

Alternatively you can use the command strings to print strings of printable characters in binary file, then use grep. This will make the output beautiful,

$ strings /bin/cat | grep GLIBC
GLIBC_2.4
GLIBC_2.3
GLIBC_2.3.4
GLIBC_2.2.5

4 thoughts on “grep: Binary file (standard input) matches

  1. Your approach to binary options differs from the vast majority of blog posts I browse,
    I’m impressed.

  2. This is certainly one of the better binary trading blogs I’ve looked over
    in ages.

  3. Your view on options trading is different than the vast majority of blogs I review, I am impressed.

  4. Your look at binary is different than almost all
    of the different blogs I browse, I’m delighted.

Leave a comment

Your email address will not be published. Required fields are marked *