Problem with Archiving .tar

Derek Broughton news at pointerstop.ca
Wed Oct 31 01:35:41 UTC 2007


Mark Nichols wrote:

> On 10/30/07, Derek Broughton <news at pointerstop.ca> wrote:
>>
>> Chris Lemire wrote:
>>
>> > tar doesn't use compression. It just creates archives. If you want
>> > compression, you should use bzip2 or gzip in combination with tar.
>>
>> Why deliberately try to confuse users?  Of course tar uses compression.
>>
>> $ tar --help | egrep "\-[zj]"
>>       --no-ignore-command-error   treat non-zero exit codes of children
>>       as
>>   -i, --ignore-zeros         ignore zeroed blocks in archive (means EOF)
>>   -j, --bzip2                filter the archive through bzip2
>>   -z, --gzip, --gunzip, --ungzip   filter the archive through gzip
>>
>> Oh - looks like tar uses compression...
> 
> 
> Actually it looks like tar has the ability to filter its output  _through_
> bzip2 or gzip.  Tar in an off itself doesn't do compression.

>From the point of view of the user, tar accepts the option and performs the
operation.  It's NOT like piping the output of tar into gzip, though you
can do that if you want.  So yes, I stand by my statement that tar _does_
use compression, and saying anything else to a user who's having trouble
with tar and compression is needlessly confusing.
-- 
derek





More information about the ubuntu-users mailing list