diff options
Diffstat (limited to 'runtime/doc/xxd.1')
-rw-r--r-- | runtime/doc/xxd.1 | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/runtime/doc/xxd.1 b/runtime/doc/xxd.1 index c76f89b..2c00d53 100644 --- a/runtime/doc/xxd.1 +++ b/runtime/doc/xxd.1 @@ -1,4 +1,4 @@ -.TH XXD 1 "August 1996" "Manual page for xxd" +.TH XXD 1 "May 2024" "Manual page for xxd" .\" .\" 21st May 1996 .\" Man page author: @@ -190,7 +190,8 @@ When editing hex dumps, 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 -hex dump 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. +hex dump 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 @@ -224,7 +225,8 @@ Hex dump from file position 0x100 (=1024\-768) onwards. \fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR .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 @@ -239,22 +241,25 @@ Print 3 lines (hex 0x30 bytes) from the end of .br \fI% xxd \-s \-0x30 file\fR .PP +Note: The results of the examples below are relevant to the xxd.1 man page as of +May 2024 +.PP .br Print 120 bytes as a continuous hex dump with 20 octets per line. .br \fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR .br -2e54482058584420312022417567757374203139 +2e544820585844203120224d6179203230323422 .br -39362220224d616e75616c207061676520666f72 +20224d616e75616c207061676520666f72207878 .br -20787864220a2e5c220a2e5c222032317374204d +64220a2e5c220a2e5c222032317374204d617920 .br -617920313939360a2e5c22204d616e2070616765 +313939360a2e5c22204d616e2070616765206175 .br -20617574686f723a0a2e5c2220202020546f6e79 +74686f723a0a2e5c2220202020546f6e79204e75 .br -204e7567656e74203c746f6e79407363746e7567 +67656e74203c746f6e79407363746e7567656e2e .br .br @@ -262,32 +267,32 @@ Hex dump 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 2241 .TH XXD 1 "A +00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M .br -000000c: 7567 7573 7420 3139 3936 2220 ugust 1996" +0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma .br -0000018: 224d 616e 7561 6c20 7061 6765 "Manual page +00000018: 6e75 616c 2070 6167 6520 666f nual page fo .br -0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\ +00000024: 7220 7878 6422 0a2e 5c22 0a2e r xxd"..\\".. .br -0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M +00000030: 5c22 2032 3173 7420 4d61 7920 \\" 21st May .br -000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\" +0000003c: 3139 3936 0a2e 5c22 204d 616e 1996..\\" Man .br -0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut +00000048: 2070 6167 6520 6175 7468 6f72 page author .br -0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\" +00000054: 3a0a 2e5c 2220 2020 2054 6f6e :..\\" Ton .br -0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent +00000060: 7920 4e75 6765 6e74 203c 746f y Nugent <to .br -000006c: 3c74 6f6e 7940 7363 746e 7567 <tony@sctnug +0000006c: 6e79 4073 6374 6e75 6765 6e2e ny@sctnugen. .PP .br Display just the date from the file xxd.1 .br -\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR +\fI% xxd \-s 0x33 \-l 13 \-c 13 xxd.1\fR .br -0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996 +00000033: 3231 7374 204d 6179 2031 3939 36 21st May 1996 .PP .br Copy @@ -302,11 +307,11 @@ and prepend 100 bytes of value 0x00. .br Patch the date in the file xxd.1 .br -\fI% echo "0000037: 3574 68" | xxd \-r \- xxd.1\fR +\fI% echo "0000034: 3574 68" | xxd \-r \- xxd.1\fR .br -\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR +\fI% xxd \-s 0x33 \-l 13 \-c 13 xxd.1\fR .br -0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 +00000033: 3235 7468 204d 6179 2031 3939 36 25th May 1996 .PP .br Create a 65537 byte file with all bytes 0x00, @@ -319,11 +324,11 @@ Hex dump this file with autoskip. .br \fI% xxd \-a \-c 12 file\fR .br -0000000: 0000 0000 0000 0000 0000 0000 ............ +00000000: 0000 0000 0000 0000 0000 0000 ............ .br * .br -000fffc: 0000 0000 40 ....A +0000fffc: 0000 0000 41 ....A .PP Create a 1 byte file containing a single 'A' character. The number after '\-r \-s' adds to the line numbers found in the file; @@ -388,7 +393,7 @@ The tool's weirdness matches its creator's brain. Use entirely at your own risk. Copy files. Trace it. Become a wizard. .br .SH VERSION -This manual page documents xxd version 1.7 +This manual page documents xxd version 1.7 from 2024-05. .SH AUTHOR .br (c) 1990-1997 by Juergen Weigert |