Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to unpack files w/ the tar.gz extension

Status
Not open for further replies.

estesflyer

Programmer
Dec 19, 2000
284
US
hi. I just started using linux, instead of windows.

Now that that's out of the way...


whenever i download a file, its usually compressed... and when it is, its usually tar.gz

i believe that when a file is tar.gz, it means that it was first tarred, and then.... whatever gz stands for (Please correct me if im wrong)

so anyways, my friend directed me how to do it through the bash line (the bash line, or whatever term you use for it is the command line, right?)

but that was a few weeks ago, and i've forgotten how. Please do not tell me to just go ask my friend to show me again. He is very busy, and I do not wish to bother him while he is working. If you have the knowledge to help, please do so.

TIA

- Rusty
 
Hey Rusty,
Like most Linux commands it's simple, IF you can remember which flags to use with the commands.

In this case you'll want to try this:

tar zxvf filename.tar.gz

Here's what the flags mean:

z - use whenever you have the .gz at the end
x - unpack (or extract) the compressed file
v - verbose. print actions on screen (standard linux flag)
f - extract from archive

Now, the order is important. In this case it needs to be 'zxvf.' If you get an error saying:

tar:Child returned status 2

or other errors, chances are you have the flags in the wrong order.

Be sure to remember the man pages, 'man subject.'

In this case:

man tar

Good luck!
 
BTW, .gz stands for GNU-zip, which is the compression utility developed by the GNU group, it has a better compression algorithm than regular .Z (compress) files. There is also the BZIP utility .bz which has higher compression than .gz files. To uncompress a .gz file that is not a .tar file use "gunzip {filename}" or "gzip -d {filename}". To compress files using gzip use "gzip {filename}" . Use "man gzip" to learn more. B-) d3funct
borg@pcgeek.net
The software required `Windows 95 or better', so I installed Linux.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top