xxd - Linux hex dump

A colleague of mine just found a hex dump utility for Linux. You may never need it, but when you do, you probably need it badly!

xxd creates a hex dump of a given file or standard input. It can also convert a hex dump back to its original binary form. So you can use it similar to uuencode and convert binaries to ASCII-safe attachments, or use it to patch binary files. We use it to check and see if disks are already used as ASM volumes or not. Just looking at the MBR or boot sector of a disk says enough.
dd if=/dev/sda count=1 2>/dev/null | xxd

No comments: