Hex dump or reverse hex dump
xxd -a {flag-a} -b {flag-b} -c {flag-c} -e {flag-e} -g {flag-g} ๐ flag-a ๐ flag-b ๐ flag-c ๐ flag-e ๐ flag-g xxd -a {flag-a} -b {flag-b} -c {flag-c} -e {flag-e} -g {flag-g} Sandbox: execFile · Timeout: 30s
system.file.xxd system.file.search system.file.process system.file.copy system.file.move system.file.delete | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
flag-a | string | No | - | toggle autoskip: A single '*' replaces nul-lines. Default off | -a |
flag-b | string | No | - | binary digit dump (incompatible with -ps). Default hex | -b |
flag-c | string | No | - | format <cols> octets per line. Default 16 (-i: 12, -ps: 30) | -c |
flag-e | string | No | - | little-endian dump (incompatible with -ps,-i,-r) | -e |
flag-g | integer | No | - | number of octets per group in normal output. Default 2 (-e: 4) | -g |
flag-h | string | No | - | print this summary | -h |
flag-i | string | No | - | output in C include file style | -i |
flag-t | string | No | - | append terminating zero to C include output (-i) | -t |
flag-l | string | No | - | stop after <len> octets | -l |
flag-n | string | No | - | set the variable name used in C include output (-i) | -n |
flag-o | string | No | - | add <off> to the displayed file position | -o |
flag-p | string | No | - | output in postscript plain hexdump style | -p |
flag-r | string | No | - | reverse operation: convert (or patch) hexdump into binary | -r |
flag-r-2 | string | No | - | revert with <off> added to file positions found in hexdump | -r, -s |
flag-d | string | No | - | show offset in decimal instead of hex | -d |
flag-s | string | No | - | Set the flag-s parameter | -s |
flag-u | string | No | - | use upper case hex letters | -u |
flag-R | string | No | auto | colorize the output; <when> can be 'always', 'auto' or 'never' | -R |
flag-v | string | No | - | show version: "xxd 2026-03-19 by Juergen Weigert et al." | -v |
ps | boolean | No | - | output in postscript plain hexdump style. | -ps |
Basic usage with flag-a
xxd ${flag-a} Display help message
xxd --help xxd is a command-line utility for hex dump or reverse hex dump.
xxd -a {flag-a} -b {flag-b} -c {flag-c} -e {flag-e} -g {flag-g}