Displaying a file or device in hex


A while back I came across the hexdump utility, which allows you to dump the contents of a device or file in hexadecimal:

$ dd if=/dev/hda count=1 | hexdump -x

1+0 records in
1+0 records out
0000000 48eb 1090 d08e 00bc b8b0 0000 d88e c08e
0000010 befb 7c00 00bf b906 0200 a4f3 21ea 0006
0000020 be00 07be 0438 0b75 c683 8110 fefe 7507
0000030 ebf3 b416 b002 bb01 7c00 80b2 748a 0203
0000040 0080 8000 e051 0001 0800 80fa 80ca 53ea

This is a super useful utility!

This article was posted by Matty on 2009-12-05 10:03:00 -0400 -0400