TIL: Use xxd to create a hex dump
2022-06-02 00:00:00 +0000 UTCThe utility xxd
allows an easy way to create a hex dump of a given file. I am currently working on ccask which is a C implementation of the bitcask protocol. This calls for a binary-format database file. To create a hex dump of that file and inspect is as simple as:
tyler@devenv:~/devel/ccask$ xxd ccask_file
00000000: 58cc 050a bdb3 9862 0000 0000 0500 0000 X......b........
00000010: 0a00 0000 ffff ffff ff0a 0908 0706 0504 ................
00000020: 0302 01 ...
Man: xxd