EFS file modification and editing

First, check the software binaries under Linux:

xxd

hexdump

 

Second, the Editor:

1, for fulfilling

2、hexedit

3、vim

Vim to edit binary files. This non-Vim designed for this purpose, which has several limitations. But you can read
take a file, change a character and write it. The result is that your file only one character to change, and
the other just turned out that exactly the same.
   To make sure that Vim does not use its clever tricks in the wrong place, plus the "-b" argument when starting Vim:
        vim -b datafile
This sets the 'binary' option. Its role is to eliminate all accidental side effect. For example, 'textwidth'
is set to zero, so that lines of text to the unauthorized publishing. And files are always read in Unix file format.
Binary mode can be used to modify the message packets of a program. Be careful not to insert or delete any characters, it will make the program operational
line problems. Into the replacement mode with "R" command.
Many characters in the file are not displayed. Hex format display their values:
        : SET = uhex the display
is also possible to display a cursor at the character value with the command "ga". When the cursor is on a character,
the output of the command looks like this:
          27, 1B Hex, Octal 033 
file might not be many line breaks. You can turn off the 'wrap' option to get an overview of the effect of:
        : nowrap the SET
byte position
to find your current byte position in the file, use this command:
        G CTRL-G
output is lengthy:
    Col 9-16 of 9-16; Line 277 of  330; Word 1806 of 2058; Byte 10580 of 12206
The last two numbers and the current byte position in the file total number of bytes in the file. This has been considered the 'fileformat'
option causes different line breaks bytes impact.
    To move a file in a specified byte, please use the "go" command. For example, to move to byte 2345:
        2345go
use XXD
a real binary editor Used to display text in two ways: binary and hexadecimal format. You can Vim
"xxd" to achieve this effect by converting the program. The program was released along with Vim.
   First edit the file in binary mode:
        -b datafile vim
now with xxd convert the file to hex:
        :!% Xxd
text looks like this:
        0000000: 1f8b 39d7 173b 0808 0203 7474 002B 4e49 .... 9 ..; .. TT + the NI. 
        0000010: 4b2c the 8660 eb9c ECAC c462 eb94 345e 2e30 K, .0 ^ .` ..... b..4 
        0.00002 million: 0b22 0ca6 c1a2 373b 2731 1035 39d9 D669. 7; '. 1. "..... i.59. 
Now you may want to read and edit the text. Vim to treat this information as plain text.
Changing the hex does not cause the display can change the character part, and vice versa.
   Finally, use the following command to convert it back with:
        :!% Xxd -r
only the changes hex part are used. Modify the text can be displayed on the right part is negligible.
 

Published 26 original articles · won praise 34 · views 90000 +

Guess you like

Origin blog.csdn.net/qq_36662437/article/details/100552771