LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-05-2005, 09:05 AM   #1
logicalfuzz
Member
 
Registered: Aug 2005
Distribution: Arch Linux
Posts: 291

Rep: Reputation: 41
extracting multiple files with tar -xjvf


how do we untar multiple tar.bz2 or tar .gz files ?
tar -xjvf *.tar.bz2 does not seem to work.
secondly, does foo.tbz use
tar -cjvf foo.tbz foo/
or something else?
 
Old 11-05-2005, 09:19 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
1) Try this.
for i in *.gz; do tar -xzvf $i; done

2) Don't know what you are saying.
 
Old 11-05-2005, 09:24 AM   #3
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 50
Using sh
Code:
#/bin/sh
#for file in `ls *.tar.gz`
#do
#tar zxvf $file
#done
press enter after typing done
 
Old 11-06-2005, 02:21 AM   #4
logicalfuzz
Member
 
Registered: Aug 2005
Distribution: Arch Linux
Posts: 291

Original Poster
Rep: Reputation: 41
oh thanks a lot.. i should have tried the script a long time back..
i was foolishly untarring individual files since a long time..

Quote:
2) Don't know what you are saying.
i meant, are foo.tar.bz2 and foo.tbz created from the same command, i.e. tar -cjvf ...?
well, till now i assumed that they are.
 
  


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
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 5 11-08-2010 12:02 PM
geting problem in extracting tar files p_garg Linux - Enterprise 1 09-29-2005 03:53 PM
hey geting problem in extracting tar files in version 4 p_garg Linux - Networking 1 09-29-2005 03:48 PM
extracting tar.bz2.gz files crank Linux - Newbie 5 04-19-2004 12:33 AM
unpacking multiple .tar.gz files illtbagu Linux - General 5 01-18-2003 06:43 PM


All times are GMT -5. The time now is 01:10 AM.

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