I have noticed a strange behavior when hexdump displays the hex values of a file, I have executed the following command:

hexdump -C 1.txt

And I got the following result:

enter image description here

Notice how hexdump displayed a new empty line (0000000b).

Why this empty line is displayed, and how can I get rid of it?

  • 4
    For any non-empty input it always displays a final line containing the number of bytes in the file (in your case 0x0B = 11 decimal). To get rid of it you can for example append | head -n -1. – AlexP Nov 13 '17 at 21:02
  • 1
    Looks like an Answer, @AlexP ! – Jeff Schaller Nov 13 '17 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.