Xxd
Xxd en Linux
Section titled “Xxd en Linux”Hex dump de binarios (y reverse: hex → binario). Útil para inspeccionar bytes o reconstruir archivos.
xxd [opciones] [archivo]Comandos
Section titled “Comandos”| Comando | Qué hace | Ejemplo |
|---|---|---|
xxd archivo | Hex dump con offset y ASCII. | xxd archivo.bin |
xxd -p | Hex plano (sin columnas). | xxd -p archivo.bin |
xxd -r | Reverse: hex → binario. | xxd -r hex.txt > out.bin |
xxd -l N | Solo los primeros N bytes. | xxd -l 16 archivo.bin |
xxd -s N | Empieza en el offset N. | xxd -s 0x100 f.bin |
xxd archivo.bin# 00000000: 486f 6c61 206d 756e 646f Hola mundo# offset | bytes hex | ASCII
cat archivo | xxdcat archivo_hex.txt | xxd -r > archivo_originalxxd -p archivo.bin# 486f6c61206d756e646fDocs: man xxd.