updated for version 7.0021
This commit is contained in:
@ -62,12 +62,11 @@ toggle autoskip: A single '*' replaces nul-lines. Default off.
|
||||
.IR \-b " | " \-bits
|
||||
Switch to bits (binary digits) dump, rather than hexdump.
|
||||
This option writes octets as eight digits "1"s and "0"s instead of a normal
|
||||
hexacecimal dump. Each line is preceded by a line number in hexadecimal and
|
||||
hexadecimal dump. Each line is preceded by a line number in hexadecimal and
|
||||
followed by an ascii (or ebcdic) representation. The command line switches
|
||||
\-r, \-p, \-i do not work with this mode.
|
||||
.TP
|
||||
.IR "\-c cols " | " \-cols cols"
|
||||
.IR "\-c cols " | " \-cols cols"
|
||||
format
|
||||
.RI < cols >
|
||||
octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
|
||||
@ -78,7 +77,7 @@ This does not change the hexadecimal representation. The option is
|
||||
meaningless in combinations with \-r, \-p or \-i.
|
||||
.TP
|
||||
.IR "\-g bytes " | " \-groupsize bytes"
|
||||
seperate the output of every
|
||||
separate the output of every
|
||||
.RI < bytes >
|
||||
bytes (two hex characters or eight bit-digits each) by a whitespace.
|
||||
Specify
|
||||
@ -139,7 +138,7 @@ show version string.
|
||||
.PP
|
||||
.I xxd \-r
|
||||
has some builtin magic while evaluating line number information.
|
||||
If the ouput file is seekable, then the linenumbers at the start of each
|
||||
If the output file is seekable, then the linenumbers at the start of each
|
||||
hexdump line may be out of order, lines may be missing, or overlapping. In
|
||||
these cases xxd will lseek(2) to the next position. If the output file is not
|
||||
seekable, only gaps are allowed, which will be filled by null-bytes.
|
||||
@ -152,7 +151,7 @@ When editing hexdumps, please note that
|
||||
skips everything on the input line after reading enough columns of hexadecimal
|
||||
data (see option \-c). This also means, that changes to the printable ascii (or
|
||||
ebcdic) columns are always ignored. Reverting a plain (or postscript) style
|
||||
hexdump with xxd \-r \-p does not depend on the correct number of columns. Here an thing that looks like a pair of hex-digits is interpreted.
|
||||
hexdump with xxd \-r \-p does not depend on the correct number of columns. Here anything that looks like a pair of hex-digits is interpreted.
|
||||
.PP
|
||||
Note the difference between
|
||||
.br
|
||||
@ -186,7 +185,7 @@ Hexdump from file position 0x100 ( = 1024-768) on.
|
||||
\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +-768 > hex_snippet' < file
|
||||
.PP
|
||||
However, this is a rare situation and the use of `+' is rarely needed.
|
||||
the author prefers to monitor the effect of xxd with strace(1) or truss(1), whenever \-s is used.
|
||||
The author prefers to monitor the effect of xxd with strace(1) or truss(1), whenever \-s is used.
|
||||
.SH EXAMPLES
|
||||
.PP
|
||||
.br
|
||||
@ -208,17 +207,17 @@ Print 120 bytes as continuous hexdump with 40 octets per line.
|
||||
.br
|
||||
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
|
||||
.br
|
||||
2e544820585844203120224d616e75616c207061
|
||||
2e54482058584420312022417567757374203139
|
||||
.br
|
||||
676520666f7220787864220a2e5c220a2e5c2220
|
||||
39362220224d616e75616c207061676520666f72
|
||||
.br
|
||||
32317374204d617920313939360a2e5c22204d61
|
||||
20787864220a2e5c220a2e5c222032317374204d
|
||||
.br
|
||||
6e207061676520617574686f723a0a2e5c222020
|
||||
617920313939360a2e5c22204d616e2070616765
|
||||
.br
|
||||
2020546f6e79204e7567656e74203c746f6e7940
|
||||
20617574686f723a0a2e5c2220202020546f6e79
|
||||
.br
|
||||
7363746e7567656e2e7070702e67752e6564752e
|
||||
204e7567656e74203c746f6e79407363746e7567
|
||||
.br
|
||||
|
||||
.br
|
||||
@ -226,32 +225,32 @@ Hexdump the first 120 bytes of this man page with 12 octets per line.
|
||||
.br
|
||||
\fI% xxd \-l 120 \-c 12 xxd.1\fR
|
||||
.br
|
||||
0000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
|
||||
0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A
|
||||
.br
|
||||
000000c: 616e 7561 6c20 7061 6765 2066 anual page f
|
||||
000000c: 7567 7573 7420 3139 3936 2220 ugust 1996"
|
||||
.br
|
||||
0000018: 6f72 2078 7864 220a 2e5c 220a or xxd"..\\".
|
||||
0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
|
||||
.br
|
||||
0000024: 2e5c 2220 3231 7374 204d 6179 .\\" 21st May
|
||||
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\
|
||||
.br
|
||||
0000030: 2031 3939 360a 2e5c 2220 4d61 1996..\\" Ma
|
||||
0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M
|
||||
.br
|
||||
000003c: 6e20 7061 6765 2061 7574 686f n page autho
|
||||
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\"
|
||||
.br
|
||||
0000048: 723a 0a2e 5c22 2020 2020 546f r:..\\" To
|
||||
0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
|
||||
.br
|
||||
0000054: 6e79 204e 7567 656e 7420 3c74 ny Nugent <t
|
||||
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\"
|
||||
.br
|
||||
0000060: 6f6e 7940 7363 746e 7567 656e ony@sctnugen
|
||||
0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
|
||||
.br
|
||||
000006c: 2e70 7070 2e67 752e 6564 752e .ppp.gu.edu.
|
||||
000006c: 3c74 6f6e 7940 7363 746e 7567 <tony@sctnug
|
||||
.PP
|
||||
.br
|
||||
Display just the date from the file xxd.1
|
||||
.br
|
||||
\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR
|
||||
\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
|
||||
.br
|
||||
0000028: 3231 7374 204d 6179 2031 3939 21st May 199
|
||||
0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996
|
||||
.PP
|
||||
.br
|
||||
Copy
|
||||
@ -266,11 +265,11 @@ and prepend 100 bytes of value 0x00.
|
||||
.br
|
||||
Patch the date in the file xxd.1
|
||||
.br
|
||||
\fI% echo '0000029: 3574 68' | xxd \-r \- xxd.1\fR
|
||||
\fI% echo '0000037: 3574 68' | xxd \-r \- xxd.1\fR
|
||||
.br
|
||||
\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR
|
||||
\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
|
||||
.br
|
||||
0000028: 3235 7468 204d 6179 2031 3939 25th May 199
|
||||
0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
|
||||
.PP
|
||||
.br
|
||||
Create a 65537 byte file with all bytes 0x00,
|
||||
|
||||
Reference in New Issue
Block a user