|
|
1.1 root 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: .BI -a style
70: Print file addresses in the given style (and size 4).
71: .TP
72: .B -u
73: (Unbuffered) Flush the output buffer after each 16-byte sequence.
74: .TP
75: .B -s
76: Reverse (swab) the order of bytes in each group of 4 before printing.
77: .TP
78: .B -r
79: Print repeating groups of identical 16-byte sequences as the first group
80: followed by an asterisk.
81: .SH SOURCE
82: .B /sys/src/cmd/xd.c
83: .SH "SEE ALSO"
84: .IR db (1)
85: .SH BUGS
86: The various output formats don't line up properly in the output of
87: .IR xd .
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.