View previous topic :: View next topic |
Author |
Message |
curmudgeon Veteran
Joined: 08 Aug 2003 Posts: 1744
|
Posted: Tue Jul 17, 2007 2:01 pm Post subject: How do I search for binary characters in less? [solved] |
|
|
Looking at a binary file in less, I want to find (say) the next occurance of the character 0xab. How do I do that? I know how to search for binary characters in vim, but vim doesn't display the file the way I want to see it like less does. Thanks.
Last edited by curmudgeon on Tue Jul 17, 2007 3:06 pm; edited 1 time in total |
|
Back to top |
|
|
didymos Advocate
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Tue Jul 17, 2007 2:24 pm Post subject: |
|
|
Just search for the string like you normally would: Hit forwardslash and type in 0x<whatever>. That applies to executables by the way. Less recognizes them and displays them in a special format. For something like a ROM image or other format less doesn't recognize, you still only need to search normally, only the 0x is omitted. _________________ Thomas S. Howard |
|
Back to top |
|
|
curmudgeon Veteran
Joined: 08 Aug 2003 Posts: 1744
|
Posted: Tue Jul 17, 2007 3:06 pm Post subject: |
|
|
I swear I tried that (the second case - for a non-executable file), and it didn't work before, but it does work now, so apparently, I did something wrong. Thanks. |
|
Back to top |
|
|
|