unzip .tgz files | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

unzip .tgz files

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-09-2002
Prafulla Prafulla is offline
Registered User
 
Join Date: Jul 2001
Last Activity: 7 February 2003, 11:06 PM EST
Location: India
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
unzip .tgz files

hi all


How to unzip .tgz files

waiting for suggestions
Praful
Sponsored Links
    #2  
Old 02-09-2002
DanielB DanielB is offline
Registered User
 
Join Date: Jan 2002
Last Activity: 23 October 2002, 8:58 AM EDT
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
tgz files are gzip compressed tar archives. You can extract them like this : tar xzf filename
Sponsored Links
    #3  
Old 02-09-2002
TioTony's Avatar
TioTony TioTony is offline Forum Advisor  
Bit Pusher
 
Join Date: Oct 2001
Last Activity: 6 April 2014, 6:16 PM EDT
Location: Southern California
Posts: 332
Thanks: 0
Thanked 1 Time in 1 Post
I think the previous reply may have left off something. The full command is like this:

gzip -cd <filename.tgz> | tar xvf -

You could do each commmand separately, but if your resulting tar file is too large, tar xvf will not work.
    #4  
Old 02-09-2002
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
 
Join Date: Sep 2000
Last Activity: 18 April 2014, 5:19 PM EDT
Location: Asia pacific region
Posts: 12,898
Thanks: 492
Thanked 846 Times in 381 Posts
A user may untar a compressed (gzipped) tar file with:

tar -zxvf <filename>

The z flag instructs tar to use gzip. A seperate gzip pipe is not required.

Of course, the v flag is not necessary, just makes gzip quite talkative

DanielB is quite correct when he suggests that a .tgz file may be untarred with -zxf switches (only).
Sponsored Links
    #5  
Old 02-09-2002
TioTony's Avatar
TioTony TioTony is offline Forum Advisor  
Bit Pusher
 
Join Date: Oct 2001
Last Activity: 6 April 2014, 6:16 PM EDT
Location: Southern California
Posts: 332
Thanks: 0
Thanked 1 Time in 1 Post
My mistake, I was reading fast and read "xvf" instead of "xzf".
Sponsored Links
    #6  
Old 02-09-2002
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
 
Join Date: Jul 2001
Last Activity: 16 June 2011, 4:50 PM EDT
Location: Portland, OR, USA
Posts: 1,626
Thanks: 2
Thanked 15 Times in 13 Posts
Well, you may still need to gunzip it first. Some tars' (non-GNU) do not understand the z option.

YMMV
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
unzip selected files guddu_12 Shell Programming and Scripting 3 04-25-2012 07:37 AM
Unzip .tla files chetan.c Shell Programming and Scripting 1 04-16-2012 09:40 PM
How to Unzip a file using unzip utility for files zipped without zip utility ? Sabari Nath S Shell Programming and Scripting 1 12-11-2009 05:18 PM
unzip particular gzip files among the normal data files thepurple Shell Programming and Scripting 4 11-30-2007 10:17 AM
Copy files from CD and Unzip AJD UNIX for Dummies Questions & Answers 1 04-15-2004 07:43 AM



All times are GMT -4. The time now is 10:03 PM.