xd - dump a file in hexadecimal
xd [file...]
xd outputs the contents of a file in hexadecimal, much like od -t x1 -c under Unix, but with a slightly more compressed format, placing the character representation at the end of each line, instead of on a following line.
The following operands are supported:
- file
- A pathname of an input file. If no file operands are specified, the standard input shall be used. (Note that this will result in a warning. xd normally opens a file as binary, but standard in is always opened as text. Under Unix, you can ignore the warning, but under most other systems, the output will not totally correspond to the actual contents of the file.)
0 no error. 2 One of the input files could not be opened. 3 Hardware error on standard out.
This program really does double duty with od. It was originally written before od supported the -f option, however, and only output in octal.