LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 06-27-2004, 08:47 AM   #1
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
How do I unpack _all_ tarballs in cwd?


Please forgive me if I could have found this via searching, but I just couldn't find an answer; I have many tarballs in a directory that need to be unpacked, I wish to do

tar -zxvf *.tar.gz

Is there a clean / easy way of doing this? I don't particularly want to go through all files one at a time :(

Steve
 
Old 06-27-2004, 08:56 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 57
I quite often use:
for file in `ls *.tar.gz`;do tar -xzf $file;done
 
Old 06-27-2004, 09:04 AM   #3
SBing
Member
 
Registered: Mar 2004
Posts: 519

Original Poster
Rep: Reputation: 35
Many thanks friend ;), a couple of minutes and it's done...!

Steve
 
  


Reply

Tags
loop, tar


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
unpack it with what? wally58 Linux - Newbie 5 03-02-2005 11:10 AM
how to unpack .tar? g-string 3 Debian 8 11-29-2004 09:01 AM
what do i do after i unpack the tar.gz sanjaya Linux - Software 1 02-11-2004 08:58 PM
Slackware 8.1 _all_ isos zeky Slackware 1 07-25-2002 06:07 AM
how do you unpack digital bots Linux - Newbie 5 04-09-2002 04:23 PM


All times are GMT -5. The time now is 02:40 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration