Re: Change tar to GNU

From: Bernd Walter <ticso_at_cicely12.cicely.de>
Date: Fri, 18 Feb 2005 10:35:03 +0100
On Fri, Feb 18, 2005 at 10:27:09AM +0100, Stijn Hoop wrote:
> On Fri, Feb 18, 2005 at 09:36:40AM +0100, Dag-Erling Smørgrav wrote:
> > Steve Kargl <sgk_at_troutmask.apl.washington.edu> writes:
> > > find $PATH -newermt 20050214 | xargs tar cf new.tar
> > 
> > Bad idea, for a number of different reasons (including file names
> > containing spaces or other special characters, and command line length
> > limits).  The following is slightly better, but will still fail if you
> > have files with newlines in them:
> > 
> > find $PATH -newermt 2005-02-14 | tar -c -f new.tar -T/dev/stdin
> 
> Won't find -print0 | xargs -0 ... work in all cases?

xargs possibly starts tar several times and tar overwrites the archive
every time.
Even if you get tar to append to an existing archive it can't know
about hardlinked files spanning multiple calls.

-- 
B.Walter                   BWCT                http://www.bwct.de
bernd_at_bwct.de                                  info_at_bwct.de
Received on Fri Feb 18 2005 - 08:36:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:28 UTC