From owner-freebsd-questions@FreeBSD.ORG Wed May 4 11:52:11 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA2DF1065676 for ; Wed, 4 May 2011 11:52:11 +0000 (UTC) (envelope-from kron24@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 628138FC16 for ; Wed, 4 May 2011 11:52:11 +0000 (UTC) Received: by fxm11 with SMTP id 11so1016602fxm.13 for ; Wed, 04 May 2011 04:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=8haNpWYmvm+FhmdtRlfUYWX8+z8d74jmoDub/Rzusq0=; b=tSlPdLfN4vi2Px0oPPQKA3CC53eQ0C0sI6seRdWzlg7Ewak+u0oUhgO7+c195pQWW9 N8AFmuLnWyJ+h2Y5N9vL99DaJV5C8p6AvV3ofE1yYPtLuiIp2Rsn5R63IzF/mELfS3zl YloL06jmexV7m2JQ+UHN1C9SNNcZzQSUhFGUI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=Wtz1smeTAj9rcxBZFdPXT1v6koiLTiSE7ipfyFHHpd4yKwVzOVT3+1W/hFI3015Gr7 ycVPUMGclRS5dOJ16VMgUSHvo6qygM/huG9sljKG+RK+B81m+dSpUzG3kiHzCSv3GRkH 9dNuYOPFP2tgFqhrXTIbvb3IlDfYfIyYcOW+o= Received: by 10.223.144.144 with SMTP id z16mr1136580fau.24.1304508312266; Wed, 04 May 2011 04:25:12 -0700 (PDT) Received: from [192.168.1.3] (uidzr185142.sattnet.cz [212.96.185.142]) by mx.google.com with ESMTPS id n7sm353978fam.11.2011.05.04.04.25.08 (version=SSLv3 cipher=OTHER); Wed, 04 May 2011 04:25:10 -0700 (PDT) Message-ID: <4DC13794.6010004@gmail.com> Date: Wed, 04 May 2011 13:25:08 +0200 From: kron24 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110421 Fedora/3.1.9-2.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Piping find into tar... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 11:52:11 -0000 Dne 4.5.2011 11:42, Modulok napsal(a): >>> By the way, in reference to the commands above the -j option is for > bzip2, so the extension should be .tbz o_O > > Thanks everyone! I went with the following, because it works regardless of > space characters in filenames. (Thanks for the correction on the extenion. It > should indeed be 'tbz' when using the 'j' flag.) > > find -E . -regex '.*\.txt$' -print0 | xargs -0 tar -cjf result.tbz When the amount of files is huge then tar will be invoked twice or more. Thus result.tbz will contain just files from the last invocation. I consider cpio a better option here. BR Oli