File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ Patch the date in the file xxd.1
311311.br
312312\fI % xxd \- s 0x33 \- l 13 \- c 13 xxd.1 \fR
313313.br
314- 0000033 : 3235 7468 204d 6179 2031 3939 36 25th May 1996
314+ 00000033 : 3235 7468 204d 6179 2031 3939 36 25th May 1996
315315.PP
316316.br
317317Create a 65537 byte file with all bytes 0x00,
@@ -324,11 +324,11 @@ Hex dump this file with autoskip.
324324.br
325325\fI % xxd \- a \- c 12 file \fR
326326.br
327- 0000000 : 0000 0000 0000 0000 0000 0000 ............
327+ 00000000 : 0000 0000 0000 0000 0000 0000 ............
328328.br
329329*
330330.br
331- 000fffc : 0000 0000 41 ....A
331+ 0000fffc : 0000 0000 41 ....A
332332.PP
333333Create a 1 byte file containing a single 'A' character.
334334The number after '\- r \- s' adds to the line numbers found in the file;
Original file line number Diff line number Diff line change @@ -206,25 +206,25 @@ EXAMPLES
206206
207207 Display just the date from the file xxd.1
208208 % xxd -s 0x33 -l 13 -c 13 xxd.1
209- 0000033 : 3231 7374 204d 6179 2031 3939 36 21st May 1996
209+ 00000033 : 3231 7374 204d 6179 2031 3939 36 21st May 1996
210210
211211 Copy input_file to output_file and prepend 100 bytes of value 0x00.
212212 % xxd input_file | xxd -r -s 100 > output_file
213213
214214 Patch the date in the file xxd.1
215215 % echo "0000034: 3574 68" | xxd -r - xxd.1
216216 % xxd -s 0x33 -l 13 -c 13 xxd.1
217- 0000033 : 3235 7468 204d 6179 2031 3939 36 25th May 1996
217+ 00000033 : 3235 7468 204d 6179 2031 3939 36 25th May 1996
218218
219219 Create a 65537 byte file with all bytes 0x00, except for the last one
220220 which is 'A' (hex 0x41).
221221 % echo "010000: 41" | xxd -r > file
222222
223223 Hex dump this file with autoskip.
224224 % xxd -a -c 12 file
225- 0000000 : 0000 0000 0000 0000 0000 0000 ............
225+ 00000000 : 0000 0000 0000 0000 0000 0000 ............
226226 *
227- 000fffc : 0000 0000 41 ....A
227+ 0000fffc : 0000 0000 41 ....A
228228
229229 Create a 1 byte file containing a single 'A' character. The number af‐
230230 ter '-r -s' adds to the line numbers found in the file; in effect, the
You can’t perform that action at this time.
0 commit comments