How to overwrite some bytes of a binary file with dd?

后端 未结 1 1960
暗喜
暗喜 2020-12-05 06:49

I have a binary file and i want to replace the value A2 at address DEADBEEF with some other value, say A1.

How can I do this w

1条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 07:35

    printf '\xa1' | dd conv=notrunc of=somefile bs=1 seek=$((0xdeadbeef))
    

    0 讨论(0)
提交回复
热议问题