Software >
Make a hexdump or do the reverse.
Table of Contents [hide]
Usage ∞
xxd filename.ext
Examples ∞
A white 10x10 PNG image ∞
0000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452 .PNG........IHDR 0000010: 0000 000a 0000 000a 0802 0000 0002 5058 ..............PX 0000020: ea00 0000 1549 4441 5418 9563 fcff ff3f .....IDAT..c...? 0000030: 036e c084 476e 044b 0300 a5e3 0311 e607 .n..Gn.K........ 0000040: 23b7 0000 0000 4945 4e44 ae42 6082 #.....IEND.B`.
Here's how I can spit it back out into a .png using a here document:
( xxd -r<<'PNG_FILE' 0000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452 .PNG........IHDR 0000010: 0000 000a 0000 000a 0802 0000 0002 5058 ..............PX 0000020: ea00 0000 1549 4441 5418 9563 fcff ff3f .....IDAT..c...? 0000030: 036e c084 476e 044b 0300 a5e3 0311 e607 .n..Gn.K........ 0000040: 23b7 0000 0000 4945 4e44 ae42 6082 #.....IEND.B`. PNG_FILE ) > /path/to/10x10_white.png
A deadbeef empty playlist ∞
(DeaDBeeF)
( \xxd -r << 'DBPL' # xxd 0000000: 4442 504c 0102 0000 0000 0000 DBPL........ DBPL ) > /path/to/deadbeef_empty_playlist.dbpl