Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Oct 2001 15:34:02 -0600
From:      Lucas Bergman <lucas@fivesight.com>
To:        "Alson van der Meulen" <alson@flutnet.org>, lists@natserv.com
Cc:        FreeBSD Questions List <questions@FreeBSD.ORG>
Subject:   Re: Archiving large number of files
Message-ID:  <15325.52042.88160.224542@apu.five.sight>
In-Reply-To: <20011029212551.G30280@md2.mediadesign.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>

next in thread | previous in thread | raw e-mail | index | archive | help
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.  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.

Lucas


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15325.52042.88160.224542>