Possible Duplicate:
Searching a log file
Where I can either enter a binary file or the text file I have and search for a pattern of a multiple hex values.
What is viewed in my Text File:
0x000001A0: 36 5B 09 76 99 31 55 09 78 99 34 51 49 BF E0 03
0x000001B0: 28 0B 0A 03 0B E0 07 28 0B 0A 03 0B 49 58 09 35
For example: I want to be able to find the pattern ’49 BF E0 03 28 0B 0A’, Which goes across lines 1 and 2 above but I can’t just search for it regularly because of the 0x000001B0: at the beginning of the line
Above is what is seen in the text file.
The issue is if it’s in binary I’m not sure where I’m located in the file where as if I were in the text file I know what location i’m in (which is necessary).
Needs to be free.
You don’t need to use emacs because vim can do it for you (I say this because you tagged this vim, and not to start a flame war).
To do this in vim, open your binary in vim and type the following:
This will filter the file and convert to hex mode. So something that looks like this when you open:
will display as
when you run that command. To convert back to binary form after you’re done editing, type: