Quick Tutorial |
Additional to the well known / and ? for searching ASCII strings there are two new commands for searching binary strings. These are the keys \ and #. In the ASCII search commands / and ? you can use \n, \r, \t and \0. You can also use regular expressions. Do not use ^ and $, because there are no lines in a binary file. Type /foo\0RETURN to search for the null terminated string foo in the file.
In the Hex section you can search for a sequence of bytes in hexadecimal
notation, e.g. Global SearchThere is also a global search option available, but only with the print option.Example: :g/text_pattern/pRETURNThis commands are displaying all found patterns, one per screen line. Of course you can limit the search to a certain part of the file by specifying the starting and ending address. Other forms of the global search command are line oriented, therefor not useful for binary files and not implemented, e.g.
Last update: Thu Jun 01 12:00:00 CEST 2000 by Gerhard Bürgmann |