Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to grep a string in a binary file?

Answer:

Assume you have a binary file "foo.bin", you can combine strings with the grep command.

strings foo.bin | grep bar

  1. What are the difference between CHAR BINARY and BINARY type in MySQL
  2. Count the number of matching lines from grep
  3. How to grep for tab character(s) in Linux
  4. Change the maximum allowed binary log file size in MySQL
  5. How to replace a string in a file using Perl

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>