Created
September 18, 2014 07:30
-
-
Save wteuber/286358ef1cd17f3100e5 to your computer and use it in GitHub Desktop.
Hex dump/restore binary file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat, print file.bin's binary content | |
cat file.bin | |
# => | |
# DUMP - convert binary content to hex string | |
xxd -p file.bin | tr -d '\n' | |
# => 48656c6c6f20576f726c640a | |
# RESTORE - convert hex string to binary content | |
echo 48656c6c6f20576f726c640a | xxd -r -p | |
# => Hello World |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment