Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grep text in a binary file

Status
Not open for further replies.

unixwhoopie

Programmer
May 6, 2003
45
US
I am trying to do a grep on a file, but I am always getting this message -

Binary file tmp.log matches.

I am giving the following command to search for 3038 and display all the lines in the file -
grep -40 '3038' tmp.log

I am kind of new to grep and trying to figure it out...

thanks
 
Maybe try...
Code:
strings tmp.log | grep -40 '3038'
That will pull the strings out of the binary file, then do the [tt]grep[/tt] on that.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top