Re: Gzip problems
Larry writes:
> If I just gzip and gunzip a file, I don't get it either. I gziped
> these in batch ??
>
> There is a constant (as far as I've examined) 512 bytes on front,
> with a few ID things, like file name, etc, with lots of 0's.
>
> On the end, there's many more bytes, well over 1000. Haven't
> determined yet if it's a constant number (probably is).
>
> I can write such a program, just wondered if I did something wrong
> procedurally, so I'll "don't to that" anymore. Or if there was a
> gunzip option (which I don't see) that would undo it.
What is strange is this sounds a lot like tar. Here is the 512 byte
header I made using the command 'tar cf test.tar main.cpp':
00000000 6D 61 69 6E 2E 63 70 70 00 00 00 00 00 00 00 00 main.cpp........
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000060 00 00 00 00 30 31 30 30 36 34 34 00 30 30 30 31 ....0100644.0001
00000070 37 35 30 00 30 30 30 31 37 35 30 00 30 30 30 30 750.0001750.0000
00000080 30 30 30 36 31 33 36 00 30 37 36 37 34 37 36 37 0006136.07674767
00000090 36 31 35 00 30 31 31 36 37 32 00 20 30 00 00 00 615.011672. 0...
000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000100 00 75 73 74 61 72 20 20 00 6C 69 7A 7A 79 00 00 .ustar .lizzy..
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000120 00 00 00 00 00 00 00 00 00 6C 69 7A 7A 79 00 00 .........lizzy..
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
At the bottom are a great deal of zeros. tar places the files within
block boundaries and pads the boundaries with zeroes.
Anyway, if this is what is going on and the tar files are the same
name as the file it should be, you'll need to change the mis-named tar
names temporarily before you untar them. This should do it:
for i in * ; do mv $i $i.tar ; done
and then just untar them (individually its 'tar xf SOMETHING.tar'):
for i in *.tar ; do tar xf $i ; done
provided that works you'll need to delete them (rm *.tar).
Elizabeth
Reply to: