Piping find into tar...

Modulok modulok at gmail.com
Wed May 4 09:42:46 UTC 2011


>> 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

As for pax, I thought tar could create pax archives too, via the --format pax
option?

Cheers Everyone!
-Modulok-


More information about the freebsd-questions mailing list