Você provavelmente teria que criar um loop bash e ter dd pulando os bytes necessários para cada bloco.
Escrever um programa simples em C é mais fácil.
$ cat >cvt.c
#include <unistd.h>
#include <string.h>
#define SKIPBYTES (2074)
#define BUFSIZE (1048580)
#define STRIPBYTES (4)
void main()
{
char buf[BUFSIZE]; /* buffer to hold one block of data to tranfser */
ssize_t count=0;
read(0,buf,SKIPBYTES); /* read initial data to skip */
while (1)
{
memset( (void *)buf,0,BUFSIZE); /* fill with zero-bytes */
count=read(0,buf,BUFSIZE); /* possibly read a full buffer */
if (count>0)
write(1,buf,BUFSIZE-STRIPBYTES); /* write almost all bytes */
else
break;
};
}
Pressione e segure a tecla CTRL e pressione d uma vez.
$ gcc -o cvt cvt.c $ chmod 755 cvt $ ./cvt <largefile.raw >filtered-file.dd
Nota: "fd" 0 é stdin, 1 é stdout, 2 é stderr
Verificar:
$ man leia
$ man 2 write