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.
source share