echo

Generate a binary file:

echo -n -e '\x30\x31\x32' > a.bin
hexdump a.bin