Whats Hex Dump - What Does It Mean?

thegladiator:~/cp$ cat new.txt Hello World This is a Trest Progyy thegladiator:~/cp$ hexdump new.txt 0000000 6548 6c6c 206f 6f57 6c72 2064 6854 7369 0000010 6920 2073 2061 7254 7365 2074 7250 676f 0000020 7979 000a 0000023 

How is this text data displayed in hexadecimal? What does this mean? Please let someone tell me.

+4
source share
2 answers

this is what it says, dump data in hexadecimal format:

 H 48 e 65 l 6c l 6c o 6f 

It is odd, however, that all bytes are reversed (65 48: e H)

If you are on * nix, you can use "od -x", or "man od" will tell you all the ways to get data from od :)

+8
source

Text in new.txt saved using ASCII . Each letter is represented by a number, decimal: 32-127 hexidecimal: 20-7F. So, the first three letters ( H,e,l ) are represented by decimal numbers: 72,101,108 and hexadecimal numbers: 48,65,6C

Hexdump by default accepts every 16-bit word of the new.txt input file and prints this word as a hexadecimal number. Since it works on 16 bits, not 8 bits, you see the result in unexpected order.

If you use xxd new.txt , you will see the result in the expected order.

+6
source

Source: https://habr.com/ru/post/1346972/


All Articles