LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to Unzip tar.gz Files in Redhat 7.2 (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-unzip-tar-gz-files-in-redhat-7-2-a-122113/)

newbie2linux 12-02-2003 07:58 PM

How to Unzip tar.gz Files in Redhat 7.2
 
I'm having problems unzipping tar.gz files.

I've looked it up on the internet, but whatever I try to do, I keep getting errors when I try to unzip them. I don't know what to do anymore. I'd appreciate it if someone could help me out. Thanks in advance.

darthtux 12-02-2003 08:03 PM

What errors are you getting. The command line syntax is:

tar xzvf filename.tar.gz

newbie2linux 12-02-2003 08:16 PM

This is what is displayed after I try and extract it:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors

teval 12-02-2003 08:34 PM

type,

file <filename>

And see what type that says. It looks at the contents not the extension.

slakmagik 12-02-2003 08:36 PM

'file foo.tar.gz'

That should tell you what it really is and you'll be able to apply the correct commands. If that doesn't work, try changing the extension - some apps are picky about that.

-- Oops. Teval got there faster. ;)

newbie2linux 12-02-2003 08:46 PM

Thanks for the suggestions, guys.

One more thing, where do the files that get extracted go once they're exctracted using the aforementioned syntax?

teval 12-02-2003 08:56 PM

A new directory is made, inside the current one, or they are extracted straight into the current directory.

slakmagik 12-02-2003 09:54 PM

Try 'tar tzvf foo.tar.gz' and it'll show the file and directory structure that will be extracted.

darthtux 12-03-2003 08:59 PM

Quote:

Originally posted by newbie2linux
This is what is displayed after I try and extract it:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors

I have received that error several times. It sounds like the file was corrupted. Try redownloading it.


All times are GMT -5. The time now is 03:01 AM.