Re: Pipe to tar or other compressor

Cliff Pratt <[email protected]> Mon, 17 Oct 2011 16:17:34 +1300
Newsgroups gmane.org.user-groups.linux.new-zealand.general
Message-ID <[email protected]>
On 17/10/11 15:09, Jethro Carr wrote:
> On Mon, 2011-10-17 at 14:38 +1300, Cliff Pratt wrote:
>> Does tar compress? tar with -z does, but I thought that it just used
>> gzip with the -z option.
>
> Correct, tar itself has no compression, tar is more like a container for
> holding files.
>
>
> You can create compressed tar files with various command line options to
> invoke external compressors like gzip (-z) or bzip2 (-j).
>
> You can also do the same by piping the output from tar into the
> appropriate compression program, but the command options just makes
> things a little easier. :-)
>
Here's another way - from 'man tar':

      -I, --use-compress-program PROG
            filter through PROG (must accept -d)

Cheers,

Cliff

_______________________________________________
NZLUG mailing list [email protected]
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug