From owner-freebsd-questions@FreeBSD.ORG Wed May 4 07:40:45 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 579F3106566B for ; Wed, 4 May 2011 07:40:45 +0000 (UTC) (envelope-from demelier.david@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id DA5708FC12 for ; Wed, 4 May 2011 07:40:44 +0000 (UTC) Received: by wwc33 with SMTP id 33so852522wwc.31 for ; Wed, 04 May 2011 00:40:43 -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=jHgVJCMHz8zqCoYshbIe+DjMJckIUEfKq1GLFNnZAhU=; b=rpcC0KrubKoCIXUCrZRspWtu620Bba2nNqZUZUVQXl9kv/wdkRTlqxGhojc6UCTDUQ i1j2Sk41mFOBUk7U+gi2YR/vdrCBLdqbd7WcUQlu+CJf3Jkc/YFcpLkQR7URfnaDmXdl AEX9KG+H9FDEa84Vw2cmIbZ6eMY8aG9RXjPVM= 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=cxehW2qslFMCDt5DVbiV0YOC9Vvip5cjBqa3mPpelPFOJn7HWgsWKX/kCMP+oWCirC I4yw2XzhIqMoZgI3fF3LTx8NDFMYaG9cZb0zPmkKBatHLoKWUSh1QdbRtPl6ebMyrnML iINOfGI+CU7R64oEDxYaRrFtY6HvYbJGHtko0= Received: by 10.227.29.27 with SMTP id o27mr821810wbc.16.1304494843609; Wed, 04 May 2011 00:40:43 -0700 (PDT) Received: from Melon.malikania.fr (wifi-osiris-sec-181-201.u-strasbg.fr [130.79.181.201]) by mx.google.com with ESMTPS id o23sm505672wbc.61.2011.05.04.00.40.42 (version=SSLv3 cipher=OTHER); Wed, 04 May 2011 00:40:42 -0700 (PDT) Message-ID: <4DC102CA.9060706@gmail.com> Date: Wed, 04 May 2011 09:39:54 +0200 From: David Demelier User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 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 07:40:45 -0000 On 04/05/2011 09:25, Modulok wrote: > List, > > I've been playing with the find command lately. Is there a way I can pipe the > putput list of files from find, into the tar command to create an archive which > contains the files which find lists? I tried the following, but it didn't work > (obviously). > > find -E . '.*\.txt$' -print | tar -cjf result.tgz > > Thanks! > -Modulok- > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" Hi Modulok, As Peter said you could try using the xargs command with find. This should works as well: find -E . '.*\.txt$' -print | xargs tar -czf result.tgz -- David Demelier