Comment by liqilin1567
1 year ago
One of my biggest headaches is stripping specific number of bytes from the head or tail of a binary file. and I couldn't find any built-in tool for that, so I wrote one in C++.
1 year ago
One of my biggest headaches is stripping specific number of bytes from the head or tail of a binary file. and I couldn't find any built-in tool for that, so I wrote one in C++.
Last X bytes: dd bs=1 skip=X
First X bytes: dd bs=X count=1
Thanks, there were few errors after testing.
1. stripping fist X bytes: dd bs=1 skip=X
2. stripping last X bytes: truncate -s -X