Piping find into tar...
demelier.david at gmail.com
Wed May 4 07:40:45 UTC 2011
On 04/05/2011 09:25, Modulok wrote:
> 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
> find -E . '.*\.txt$' -print | tar -cjf result.tgz
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
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
More information about the freebsd-questions