Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Making Sense of Hexdump (2008) (suse.com)
38 points by pamoroso on Jan 10, 2023 | hide | past | favorite | 5 comments


A useful tool to throw together real quick: something that takes `hexdump -C` (or Go's `hex.Dump`, or whatever) and converts it back to binary.


You may want to try xxd -r. https://linux.die.net/man/1/xxd

Of course, if you're just looking for a fun programming exercise, then don't let me stop you :)


Just checked, and on macOS at least, `xxd -r` doesn't properly parse `hex.Dump`.


Speaking of macOS, I like the Hex Fiend application to display/edit files in hexadecimal (though it cannot be used on the command line).


Instead of hexdump one can use od, "octal dump". For example,

     echo xyz|od -An -tx1|xxd -p -r




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: