How do I create an unmodified hex dump of a binary file in Linux using bash? The od and hexdump commands both insert spaces in the
od
hexdump
It seems to depend on the details of the version of od. On OSX, use this:
od -t x1 -An file |tr -d '\n '
(That's print as type hex bytes, with no address. And whitespace deleted afterwards, of course.)