LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   tar with gz (https://www.linuxquestions.org/questions/linux-newbie-8/tar-with-gz-269147/)

keimdf 12-22-2004 06:51 AM

tar with gz
 
Here is another one that has me stumped.

I have several files that end in .gz

i have tried

tar -xcz file.gz

but it just hangs there and doesn't do anything.

any ideas?

slakmagik 12-22-2004 06:54 AM

gunzip file

if they're just gzipped. Try 'file file' if that doesn't work, to see what it really is.

Oh, and it'd be 'tar xzf' to extract a tar.gz.

whipermr5 12-22-2004 06:55 AM

try
Code:

tar -zxvf filename

keimdf 12-22-2004 07:46 AM

Tried several different ways and got this.

[root@ANAKIN DOTDgz]# tar -zxvf sasp.d.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Error exit delayed from previous errors

same with

tar -xzf sasp.d.gz

I placed the files (over 350) on this drive in windows. Does that make a difference?

when I mount the drive in windows, I can use Winzip and it works just fine. But I have to do it one file at a time. Lot of work!

If I can do it in Linux, I would assume that I could do it using a wildcard.

tar -zxvf *.gz or something like that.

sharper 12-22-2004 07:57 AM

If sasp.d.gz is the actual file name it is probably not a tar file

Try gunzip <filename> of gzip -d <filename>

slakmagik 12-22-2004 08:43 AM

As I said before (apparently not clearly enough):

Code:

~
1002>> file sasp.d.gz
sasp.d.gz: gzip compressed data, was "sasp.d", from Unix

~
1003>> gunzip sasp.d.gz

~
1004>>

If labelled correctly, a 'gz' is not a 'tar.gz' and you don't use tar.

keimdf 12-22-2004 08:47 AM

thanks

I thought it was part of tar for gzip not a separate program.

Everything is working just fine.


All times are GMT -5. The time now is 06:57 PM.