I was searching for how to do a reverse hexdump and found xxd mentioned. However, it does not seem to work with simply:
xxd -r hexdumpfile > binaryfile
I then compared the difference between outputs of xxd infile and hexdump infile, and found three differences:
- xxd output has a colon after the address
- xxd output has the positions in the data reversed (for example,
5a42in hexdump output becomes425ain xxd output) - There are some extra characters after each line
I only have the hexdumped version of certain files on a server. How can I correctly get back the binary data using xxd?