LinuxQuestions.org
Review your favorite Linux distribution.
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 02-15-2006, 08:47 AM   #1
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Rep: Reputation: 30
how-to: tar -zxvf multiple files at once


Hey guys! I have a dir full of .tar.gz files and I would like to extract them all at once. I tried tar -zxvf *.tar.gz and tar -zxvf *tar.gz but it didn't work. Is there any way to do that? Thanks!
 
Old 02-15-2006, 08:56 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
not sure, but you could do

for each in `ls *.tar.gz`
do
tar -zxvf $each
done



although i dont believe you actually need the -z option with Gnu tar. also check the the output of ls is not formatted in some wierd way. basically this says 'for each thing in ls *.tar.gz do tar -xvf on it then finish'.

hope that helps

Last edited by satinet; 02-15-2006 at 08:58 AM.
 
Old 02-15-2006, 09:01 AM   #3
muha
Member
 
Registered: Nov 2005
Distribution: xubuntu, grml
Posts: 451

Rep: Reputation: 37
has been aswered before: http://www.linuxquestions.org/questi...d.php?t=119987
 
Old 02-15-2006, 09:59 AM   #4
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Original Poster
Rep: Reputation: 30
satinet: Yesssssssssss it worked!!!!! Thanks a lot!
 
  


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
extracting multiple files with tar -xjvf logicalfuzz Linux - Software 3 11-06-2005 02:21 AM
tar zxvf and slackware 10.0 paul62 Slackware 5 09-25-2004 12:25 PM
How do I decompress and desarchive multiple .tar.gz files to a single directory? Baldorg Linux - Software 7 11-27-2003 01:42 PM
unpacking multiple .tar.gz files illtbagu Linux - General 5 01-18-2003 06:43 PM
tar -zxvf *.tgz adam_boz Linux - Newbie 9 09-03-2002 05:25 AM


All times are GMT -5. The time now is 07:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration