|
SUMMARY : binary file editing using standard tool ?: msg#00070os.solaris.managers.summaries
How to edit binary without : - vim/xxd - perl - gnutools - (tr and sed are only for text data) a solution is to use dd and echo as described by Paul below. ======================================================================== dd is the mother of all commands. This might be painful, but it should work (I've done something like this in a pinch as well--make sure you know where the byte to change is because of endian issues). ( dd ifs=1 ofs=1 if=input_file count=SOME_NUMBER printf "%c",241 dd ifs=1 ofs=1 if=input_file skip=`expr SOME_NUMBER + 1` ) > output_file ======================================================================== I guess with adb it should work also but I couldn't make it. Thanks to : Bertrand, Charles, Alan, Darren, Anthony and Paul. :-) ORIGINAL POST : > I found a very interesting problem yesterday. I had to modify a binary > file (replacing a '0' with '1') on a solaris 2.6 system. > The host was on a high secure net and could not have 3rd party product > installed. > > To change binary file, I use either vim/xxd or perl, unfortunately these > tools were not installed on this host. > > What other standard tools remain if I want, say, to change ".240" with > ".241" on a binary file ? |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | SUMMARY: Location of vxbench: 00070, Miller, Anthony, A, Tech Dev, VF UK |
|---|---|
| Next by Date: | SUMMARY: Roll Your Own Package Patches: 00070, Crist Clark |
| Previous by Thread: | SUMMARY: Location of vxbenchi: 00070, Miller, Anthony, A, Tech Dev, VF UK |
| Next by Thread: | SUMMARY: Roll Your Own Package Patches: 00070, Crist Clark |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |