From owner-freebsd-questions Mon Oct 29 13:36:36 2001 Delivered-To: freebsd-questions@freebsd.org Received: from pcwin002.win.tue.nl (pcwin002.win.tue.nl [131.155.71.72]) by hub.freebsd.org (Postfix) with ESMTP id D8FBD37B40D for ; Mon, 29 Oct 2001 13:36:31 -0800 (PST) Received: (from stijn@localhost) by pcwin002.win.tue.nl (8.11.6/8.11.4) id f9TLa1n75878; Mon, 29 Oct 2001 22:36:01 +0100 (CET) (envelope-from stijn) Date: Mon, 29 Oct 2001 22:36:01 +0100 From: Stijn Hoop To: Lucas Bergman Cc: Alson van der Meulen , lists@natserv.com, FreeBSD Questions List Subject: Re: Archiving large number of files Message-ID: <20011029223601.A75666@pcwin002.win.tue.nl> References: <20011029151306.D53339-100000@x1-6-00-50-ba-de-36-33.kico1.on.home.com> <20011029151557.Y51329-100000@zoraida.natserv.net> <20011029212551.G30280@md2.mediadesign.nl> <15325.52042.88160.224542@apu.five.sight> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <15325.52042.88160.224542@apu.five.sight>; from lucas@fivesight.com on Mon, Oct 29, 2001 at 03:34:02PM -0600 X-Bright-Idea: Let's abolish HTML mail! Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Oct 29, 2001 at 03:34:02PM -0600, Lucas Bergman wrote: > Alson van der Meulen wrote: > > Francisco Reyes wrote: > > > Dru wrote: > > > > Francisco Reyes wrote: > > > > > > > > > I have several directories with 20,000+ files which I need to > > > > > archive. I have been trying tar+Gzip, but the files are too > > > > > many for tcsh to handle in one pass any suggestions on how to > > > > > go about this? > > > > > > > > I think piping through "xargs" would do the trick. > > > > > > Could you give me a quick example of how xargs work? > > > > find .|xargs tar cf tarball.tar > > Careful. If xargs has to spawn more than one 'tar' process, then this > is going to overwrite tarball.tar. Good one, never thought of that. > Better to do > > $ rm tarball.tar > $ find . | xargs tar rf tarball.tar > > N.B.: this assumes there are no files or directories with whitespace > in their names. $ rm tarball.tar ; find . -print0 | xargs -0 tar rf tarball.tar would probably do the trick then. --Stijn -- The rain it raineth on the just And also on the unjust fella, But chiefly on the just, because The unjust steals the just's umbrella. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message