LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-13-2002, 11:35 AM   #1
dalraidia
Member
 
Registered: Dec 2002
Location: Tallahassee, Florida
Posts: 30

Rep: Reputation: 15
tar archives of type tgz


I have downloaded a file, and the instructions on using the material say to "unpack it in the usual way using tar". The file has an extension of .tgz and when I do "tar -xf file.tgz" it fails with messages "tar: this does not look like a tar archive" etc. What am I doing wrong?

Thanks,
Newbie John
 
Old 12-13-2002, 11:39 AM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,743
Blog Entries: 4

Rep: Reputation: 76
The file needs to be gunzipped first. try this:
tar -zxf your-file.tgz
The "z" flag uncompresses gzipped files. You would do the same to unzip/tar your-file.tar.gz

Like wise with:
tar -jxf your-file.tar.bz2
you can uncompress bzip2'd files.
 
Old 12-13-2002, 12:39 PM   #3
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
To find out what any given file type is, and then determine your needs (for uncompressing in this situation) to work with the file, use the command 'file'. So:
file filename

And if 'filename' is a tar.gz file with the extensions removed, file will tell you exactly what it is, or appears to be.

Cool
 
Old 12-13-2002, 09:54 PM   #4
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Rep: Reputation: 30
A .tgz file is the same as a .tar.gz, the extension is just different.
You can unpack it by using tar -zxf filename, or if you want to see what it's doing use tar -zxvf filename.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I password tar.gz archives? Cyberian Linux - Security 11 10-20-2010 06:11 PM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM
tgz vs tar.bz2 Micro420 Mandriva 4 10-22-2003 10:19 PM
.rpms, .tar.gz, .tgz, .src.rpm, & .tar.bz2 whoots Mandriva 10 10-18-2003 12:08 PM
.tgz or .tar.gz c0c0deuz Linux - General 9 12-14-2001 10:37 AM


All times are GMT -5. The time now is 11:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration