Jean-Louis Martineau <[EMAIL PROTECTED]> ha escrit:

>  > touch 1
>  > tar cz 1 > file.tgz
>  > ls -al file.tgz
> -rw-rw-r-- 1 martinea martinea 10240 Nov 23 07:32 file.tgz
>  > dd if=file.tgz count=1 bs=108 > a.tgz
>  > gunzip -t -v a.tgz
> a.tgz:   OK
> 
> Why the file is 10k in size? Why tar pad with zeros a compressed output?
> The first 108 bytes are the compressed tar file followed by zeros.

Please, use the latest tar version. You probably are using 1.15 or
something earlier:

$ tar --version
tar (GNU tar) 1.19
...
$ touch 1
$ tar cfz - 1 > a.tgz
$ tar cf - 1 | gzip > b.tgz
$ ls -l a.tgz b.tgz
-rw-r--r--  1 gray staff 110 2007-11-23 18:06 a.tgz
-rw-r--r--  1 gray staff 110 2007-11-23 18:06 b.tgz

For more info, please see

http://lists.gnu.org/archive/html/bug-tar/2005-11/index.html#00027

-Sergey




Reply via email to