[X-Unix] strange tar behavior

Charles Howse chowse at charter.net
Mon Mar 20 10:02:43 PST 2006


On Mar 20, 2006, at 11:39 AM, Xavier Noria wrote:

> On Mar 20, 2006, at 18:14, Charles Howse wrote:
>
>> Hi,
>> When I do
>> $ tar cvfz bin.tgz bin
>> tar finishes without error -
>> $ echo $?
>> 0
>>
>> But, when I do
>> $ tar --list --verbose --file=bin.tgz
>> tar: This does not look like a tar archive
>> tar: Skipping to next header
>> tar: Read 2804 bytes from bin.tgz
>> tar: Error exit delayed from previous errors
>
> You forgot to tell tar that the file is gzipped:
>
>     $ tar --list --verbose --gzip --file=foo.tar.gz

[Slaps head] Well, gosh-darnit!  Thanks for the reminder, I've read  
man tar so many times looking for the solution that I couldn't see  
the forrest for the trees.


More information about the X-Unix mailing list