I'm trying to remeove the first 8 bytes from binary file using the command:
dd if=new.pdf of=new2.pdf ibs=1 skip=8
but it's taking too long.
Is there a way to remove the first 8 bytes, in a faster way ?
I'm trying to remeove the first 8 bytes from binary file using the command:
dd if=new.pdf of=new2.pdf ibs=1 skip=8
but it's taking too long.
Is there a way to remove the first 8 bytes, in a faster way ?
ibs=1
is requesting dd
to read one single byte at a time. It's going to be slow - for each byte, there is a context switch to the kernel.
I would:
tail -c+9 new.pdf > new2.pdf
I think you could use dd
, choose the best block size for your specific environment, and... skip the bytes:
dd if=new.pdf of=new2.pdf bs=4M iflag=skip_bytes skip=8