Date: Wed, 04 May 2011 09:39:54 +0200 From: David Demelier <demelier.david@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: Piping find into tar... Message-ID: <4DC102CA.9060706@gmail.com> In-Reply-To: <BANLkTimNyNKADJ543wDcNBE=tWqjCCEw_w@mail.gmail.com> References: <BANLkTimNyNKADJ543wDcNBE=tWqjCCEw_w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DC102CA.9060706>