plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

xd.1 (1687B)


      1 .TH XD 1
      2 .SH NAME
      3 xd \- hex, octal, decimal, or ASCII dump
      4 .SH SYNOPSIS
      5 .B xd
      6 [
      7 .I option ...
      8 ]
      9 [
     10 .BI - "format ...
     11 ] [
     12 .I file ...
     13 ]
     14 .SH DESCRIPTION
     15 .I Xd
     16 concatenates and dumps the
     17 .I files
     18 (standard input by default)
     19 in one or more formats.
     20 Groups of 16 bytes are printed in each of the named formats, one
     21 format per line.
     22 Each line of output is prefixed by its address (byte offset)
     23 in the input file.
     24 The first line of output for each group is zero-padded; subsequent are blank-padded.
     25 .PP
     26 Formats other than
     27 .B -c
     28 are specified by pairs of characters telling size and style,
     29 .L 4x
     30 by default.
     31 The sizes are
     32 .TP \w'2\ or\ w\ \ \ 'u
     33 .BR 1 " or " b
     34 1-byte units.
     35 .PD0
     36 .TP
     37 .BR 2 " or " w
     38 2-byte big-endian units.
     39 .TP
     40 .BR 4 " or " l
     41 4-byte big-endian units.
     42 .TP
     43 .BR 8 " or " v
     44 8-byte big-endian units.
     45 .PD
     46 .PP
     47 The styles are
     48 .TP 0
     49 .B o
     50 Octal.
     51 .PD0
     52 .TP
     53 .B x
     54 Hexadecimal.
     55 .TP
     56 .B d
     57 Decimal.
     58 .PD
     59 .PP
     60 Other options are
     61 .TP \w'\fL-a\fIstyle\fLXX'u
     62 .B -c
     63 Format as
     64 .B 1x
     65 but print
     66 .SM ASCII
     67 representations or C escape sequences where possible.
     68 .TP
     69 .B -R
     70 Format as
     71 .B 1x
     72 but print
     73 .B Rune
     74 representations or C escape sequences where possible.
     75 .TP
     76 .BI -a style
     77 Print file addresses in the given style (and size 4).
     78 .TP
     79 .B -u
     80 (Unbuffered) Flush the output buffer after each 16-byte sequence.
     81 .TP
     82 .B -s
     83 Reverse (swab) the order of bytes in each group of 4 before printing.
     84 .TP
     85 .B -S
     86 Reverse the order of bytes in each group of 8 before printing.
     87 .TP
     88 .B -r
     89 Print repeating groups of identical 16-byte sequences as the first group
     90 followed by an asterisk.
     91 .SH SOURCE
     92 .B \*9/src/cmd/xd.c
     93 .SH "SEE ALSO"
     94 .MR db (1)
     95 .SH BUGS
     96 The various output formats don't line up properly in the output of
     97 .IR xd .