On 2005-06-19 22:37, "Andrew L. Gould" <[EMAIL PROTECTED]> wrote:
>On Sunday 19 June 2005 10:34 pm, Olivier Nicole wrote:
>>> 2.  How does one rejoin the resulting split files to recreate the
>>> original file?  I assume you can cat text files into a new file
>>> using redirection (>>); but can you do that with a binary file?
>>
>> I'd say yes, you can cat a binary file (though it is likely to
>> mess-up your screen).
>
> That's what virtual terminals are for!  ;-)
> What's a better way of rejoining split parts of a binary file?

If you split a binary file using split(1), then just rejoin the parts
with cat(1):

        % split -b 1400000 largefile.bin
        % cat x[a-z][a-z] > largefile2.bin

After these two steps, you should have:

        largefile.bin           The original binary file.

        xaa, xab, ...           Chunks of the original file that can fit
                                in 1.4MB floppies (does anyone use these
                                anymore?)

        largefile2.bin          A second copy of the original file, that
                                was created by joining the x[a-z][a-z]
                                chunks that split(1) created

After writing this post, I realized that split(1) doesn't have an
EXAMPLES section.  I think we should add one :)

- Giorgos

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to