Viewing the hex codes of a file
Linux has a cool utility called hexdump that will output a file in hex mode. Great for looking at the raw values in a UTF-8 text file.
hexdump -C /tmp/foo.txt
Vim also ships with a xxd
binary that will output a file in a hexdump style, as well as including the ASCII representation.
hexdump /tmp/foo.txt
Leave A Reply
- 1 Reply
Replies
August 2nd 2009 - Jimmy
xxd has a generally nicer format, and will reverse a modified hexdump back into a file.