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
The other answers are preferable, but for a pure Bash solution, I've modified the script in my answer here to be able to output a continuous stream of hex characters representing the contents of a file. (Its normal mode is to emulate hexdump -C.)
hexdump -C