Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Oct 2004 23:43:15 -0700
From:      Tim Kientzle <kientzle@freebsd.org>
To:        "Jason C. Wells" <jcw@highperformance.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: tar dumps core when appending to empty file
Message-ID:  <417DF203.4070705@freebsd.org>
In-Reply-To: <417BBFEC.1050100@gamersimpact.com>
References:  <6CCE035F71E8316B634212C5@[192.168.1.16]> <417BBFEC.1050100@gamersimpact.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ryan Sommers wrote:
> Jason C. Wells wrote:
> 
>> What I am trying to do is:
>>
>> $ touch Makefiles.tar
>> $ find . -name Makefile.orig -exec tar -r -f Makefiles.tar {} \;
>>
>> This causes tar to dump core as fast as find can find the specified 
>> files.

This is clearly a bug in libarchive.
I'll commit Ryan's fix.  (Thanks, Ryan!)

In the interim, you might try this *much* faster
method:

find . -name Makefile.orig | tar -c -f Makefiles.tar -I-

This runs tar just once and also avoids the overhead
of scanning the entire archive to locate the last item
for an append.  Your approach gets awfully slow if you
have very many files to add.

Tim



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