LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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,760
Blog Entries: 4

Rep: Reputation: 78
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
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration