1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/xxd.md

33 lines
840 B
Markdown
Raw Normal View History

2017-07-06 21:56:44 +05:30
# xxd
> Create a hexadecimal representation (hexdump) from a binary file, or vice-versa.
> More information: <https://manned.org/xxd>.
2017-07-06 21:56:44 +05:30
- Generate a hexdump from a binary file and display the output:
2017-07-06 21:56:44 +05:30
`xxd {{input_file}}`
- Generate a hexdump from a binary file and save it as a text file:
2017-07-06 21:56:44 +05:30
`xxd {{input_file}} {{output_file}}`
- Display a more compact output, replacing consecutive zeros (if any) with a star:
`xxd -a {{input_file}}`
- Display the output with 10 columns of one octet (byte) each:
2017-07-06 21:56:44 +05:30
`xxd -c {{10}} {{input_file}}`
2017-07-06 21:56:44 +05:30
2019-04-06 09:34:03 -03:00
- Display output only up to a length of 32 bytes:
2018-03-19 14:44:35 +05:30
`xxd -l {{32}} {{input_file}}`
- Display the output in plain mode, without any gaps between the columns:
2017-07-06 21:56:44 +05:30
`xxd -p {{input_file}}`
- Revert a plaintext hexdump back into binary, and save it as a binary file:
2017-07-06 21:56:44 +05:30
`xxd -r -p {{input_file}} {{output_file}}`