From owner-freebsd-current@FreeBSD.ORG Tue Oct 26 06:43:20 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 515EC16A4CE for ; Tue, 26 Oct 2004 06:43:20 +0000 (GMT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0888043D5A for ; Tue, 26 Oct 2004 06:43:20 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i9Q6hF90091271; Mon, 25 Oct 2004 23:43:15 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <417DF203.4070705@freebsd.org> Date: Mon, 25 Oct 2004 23:43:15 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Jason C. Wells" References: <6CCE035F71E8316B634212C5@[192.168.1.16]> <417BBFEC.1050100@gamersimpact.com> In-Reply-To: <417BBFEC.1050100@gamersimpact.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Ryan Sommers cc: freebsd-current@freebsd.org Subject: Re: tar dumps core when appending to empty file X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2004 06:43:20 -0000 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