You can also use dd
. To get the first N bytes into foo1, use:
dd if=foo of=foo1 ibs=N count=1
to put the rest into file foo2, you have to skip the first N bytes and copy the rest:
dd if=foo of=foo2 ibs=N skip=1
Pay attention to what you type, especially in writing the input and the output files correctly. See man dd for details about the various operands (if, of, ibs, skip and count).