Tool to uncat file

Polytropon freebsd at edvax.de
Sun Feb 1 05:01:16 PST 2009


Dear list,

before starting to code on my own, I'd like to ask if there's already a
tool to uncat files, defining the file separation position as a string
of bytes, usually given in hexadecimal form.

An example could be this:

	% uncat -p 0x12,0x52,0xf1,0x09 file_orig

It creates file_1 file_2 file_3. And, of course,

	% cat file_1 file_2 file_3 > file_orig

would re-create the original file. The bytes 0x12,0x52,0xf1,0x09 tell the
file starting pattern (-p), where a new file begins.

I cannot use dd due to the fact that the files concatenated are of a
different size. So the idea would be to look for specific byte pattern
and then start a new file each time it occurs on input.

Is there such a tool, or any other ideas?




-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list