Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Feb 2009 14:01:02 +0100
From:      Polytropon <freebsd@edvax.de>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Tool to uncat file
Message-ID:  <20090201140102.e9a9a41a.freebsd@edvax.de>

Next in thread | Raw E-Mail | Index | Archive | Help
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, ...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20090201140102.e9a9a41a.freebsd>