Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-15-2006, 07:47 AM   #1
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, 07:56 AM   #2
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`
tar -zxvf $each

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 07:58 AM.
Old 02-15-2006, 08:01 AM   #3
Registered: Nov 2005
Distribution: xubuntu, grml
Posts: 451

Rep: Reputation: 37
has been aswered before:
Old 02-15-2006, 08:59 AM   #4
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

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


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

All times are GMT -5. The time now is 12:07 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration