hex dump tool xxd

It is rather conveinent to use UltraEditor to edit bytecode file of Java or other binary files, but it is rather hard to achieve it in Linux on a glance, now here comes an evangel — xxd.

1
2
3
4
5
6
xxd [option] infile  [outfile]
option:
-b #xxd will use hex dump by default, use -b to enforce binary dump
-r #revert dump
-i #use C unsigned char array as output format
-u #use upper case in HEX dump

Thus to dump the hex of a file, just use
xxd filename

This command also could be invoked in VIM enable it to be a hex editor:

  1. First open a file in binary mode with vim -b filename, or there will have a 0x0a append.
  2. in command mode type %!xxd to dump the whole file into HEX, the same as xxd command in shell.

hex dump tool xxd
https://rug.al/2014/2014-05-07-hex-dump-tool-xxd/
Author
Rugal Bernstein
Posted on
May 7, 2014
Licensed under