From owner-freebsd-questions@FreeBSD.ORG Mon Jun 20 14:29:52 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B947C16A41C for ; Mon, 20 Jun 2005 14:29:52 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E52243D4C for ; Mon, 20 Jun 2005 14:29:51 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by kane.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j5KETXhn006852; Mon, 20 Jun 2005 17:29:34 +0300 Received: from flame.pc (localhost [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id j5KETPbl000725; Mon, 20 Jun 2005 17:29:25 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id j5KD6gdX002198; Mon, 20 Jun 2005 16:06:42 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) X-Authentication-Warning: flame.pc: keramida set sender to keramida@ceid.upatras.gr using -f Date: Mon, 20 Jun 2005 16:06:42 +0300 From: Giorgos Keramidas To: "Andrew L. Gould" Message-ID: <20050620130642.GA984@flame.pc> References: <200506192231.18309.algould@datawok.com> <200506200334.j5K3YVVi064949@banyan.cs.ait.ac.th> <200506192237.18337.algould@datawok.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200506192237.18337.algould@datawok.com> Cc: Olivier Nicole , freebsd-questions@freebsd.org Subject: Re: OT: usage of split X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2005 14:29:52 -0000 On 2005-06-19 22:37, "Andrew L. Gould" 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