[manual index][section index]


xd - dump file contents in multiple formats


xd [ option ... ] [ -format ... ] [ file... ]


Xd dumps the contents of each file in one or more formats. If no file is specified, standard input is read. Input is processed in 16 byte chunks. Each chunk is output in each of the specified formats, one format per line. Each line of output is prefixed its file offset. This is zero padded for the first format; subsequent formats are blank padded. If more than one file is specified, the name of each file is output at the start of its dump.

Output formats are specified by a two character name, 4x by default. The first character defines the byte width of the format; the second character defines the style of output.

The available width specifiers are:

1 or b
1 byte units.
2 or w
2 byte big-endian units.
4 or l
4 byte big-endian units.
8 or v
8 byte big-endian units.

The available styles are:


In addition to the above format specifiers, -c can be used to denote ASCII format. This is the same as 1x except that codes are printed as printable ASCII characters or Limbo escape sequences where possible.


Unbuffered output. The output buffer is flushed after the dump of each 16 byte input chunk has been generated.
Mark repeated 16 byte input chunks. The first chunk is output as per the format specifiers, followed by an asterisk representing 1 or more occurrences of identical data.
Reverse the order of input bytes in chunks of 4 before processing for output.
Print file addresses in the given style.




There is no means of dumping 2 or 8 byte wide values in little-endian form.

XD(1) Rev:  Thu Feb 15 14:42:47 GMT 2007