I have a binary file zero.bin which contains 10 bytes 0x00 and a data file data.bin which contains 5 bytes 0x01. I want to replace the first 5 bytes of zero.bin with data.bin. I tried
dd if=data.bin of=zero.bin bs=1 count=5
but the .bin zero is truncated, and finally it becomes 5 bytes 0x01. I want to keep the tail 5 bytes 0x00.
source
share