LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 12-18-2003, 12:56 PM   #16
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Rep: Reputation: 30

There it works perfect now! You just got to make sure you use the bash shell

#!/bin/sh


for TAR in *.tar*; do
case $TAR in
*.tar.gz ) tar -xzvf $TAR;;
*.tgz ) tar -xzvf $TAR;;
*.tar.bz ) tar -xjvf $TAR;;
*.tar ) tar -xvf $TAR;;
esac
done


Enjoy!
 
Old 12-18-2003, 01:15 PM   #17
phil1076
Member
 
Registered: Oct 2001
Location: Grand Cayman
Distribution: RH 9.0
Posts: 96

Original Poster
Rep: Reputation: 16
f

Is there any chance that, perhaps in a future version, they could simplify it a tad? I mean, to create a script to do this is kind of ridiculous.

tar -xvf *.tar should work.
 
Old 12-18-2003, 01:22 PM   #18
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Rep: Reputation: 30
Well it doesnt work.If you read the posts youd see that it doesnt.You yourself said it.
Are you okay?
 
Old 12-18-2003, 01:56 PM   #19
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
he meant he would like to see "tar -xvf *.tar" work and not have to write a script for it.
 
Old 12-18-2003, 02:03 PM   #20
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Rep: Reputation: 30
Oh okay.I'm sorry.I really am.I completely misunderstood.Sorry phil.
I dont know how to get tar -xvf *.tar to work.... I'll check and see but I dont know how.
But do this : cp script.sh /bin/untarMultiple
chmod 777 /bin/untarMultiple

and untarMultiple would have my script in it.Then all you have to do is enter a directory and type untarMultiple.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
tarring a dd stream john8675309 Linux - Software 1 04-22-2005 03:04 PM
set password when bzipping/tarring/gzipping alice95089 Linux - Software 14 01-03-2005 03:09 PM
Issue tarring data Johnny Mac Linux - Newbie 5 11-12-2004 02:58 PM
Help I need help tarring multiple files in multiple directories VisionZ Linux - Newbie 28 03-25-2004 05:25 PM
Tar with --newer option tarring all dirs jlangelier Linux - Newbie 0 07-09-2003 12:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:26 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
Open Source Consulting | Domain Registration