How to create a hex dump of file containing only the hex characters without spaces in bash?

前端 未结 6 1345
后悔当初
后悔当初 2020-11-30 17:22

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

6条回答
  •  鱼传尺愫
    2020-11-30 17:33

    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.)

提交回复
热议问题