The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Reg: Gzip sam99 Shell Programming and Scripting 5 01-30-2008 07:43 AM
tar/gzip/gz...which one to use? abhijeetkul UNIX for Advanced & Expert Users 5 03-24-2006 03:00 AM
TAR and GZIP help VandeMatram UNIX for Dummies Questions & Answers 3 03-17-2006 07:35 AM
gzip mfran2002 SCO 1 12-01-2003 10:23 AM
GZIP help, please! alan UNIX for Dummies Questions & Answers 2 07-25-2003 03:58 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-12-2004
alisevA3 alisevA3 is offline
Registered User
  
 

Join Date: May 2002
Posts: 33
Post gzip

Hi All,

I have some files which are 01.tar.gz, 02.tar.gz,03.tar.gz ........30.tar.gz.
when I want to extract the files I 'm using this command "gzip -dc *.tar.gz | tar -xvf -" but it just uncompress 01.tar.gz

how can I uncompress all of them ?


thanx

alice
  #2 (permalink)  
Old 08-12-2004
rhfrommn rhfrommn is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2003
Location: Minnesota
Posts: 422
You don't say what shell you are using, but here is what I'd do in ksh. If you're not using ksh you could always start a new shell with /bin/ksh to do this command then exit back out to your normal shell.

This example assumes that the command ls *.tar.gz returns all of the ones you want to uncompress and nothing else. If that isn't true you'll have to modify it accordingly.

for i in `ls *.tar.gz`;do <return>
gzip -dc $i.tar.gz | tar -xvf - <return>
done
  #3 (permalink)  
Old 08-12-2004
alisevA3 alisevA3 is offline
Registered User
  
 

Join Date: May 2002
Posts: 33
yes I works.
thank you so much
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:13 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0