Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Newbie
Reload this Page uncompressing a tar.bz2
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Newbie If you're new to the wonderful world of Linux, start here!

Reply
 
Thread Tools Display Modes
Old 05-16-2008   #1 (permalink)
tman144566
Just Joined!
 
Join Date: May 2008
Posts: 3
uncompressing a tar.bz2

I am trying to decompress a file with an file ending of tar.bz2 without creating a directory or folder once decompressing the file and extracting the data. The only thing I know about extracting data from a file like this would be to
type the command tar -jxvf file.tar.bz2. I know this extracts the data but my main concern is how do you just extract the data instead of the data being in a newly created sub-directory such as (/the file's name/data in the tar.bz2 file). I have tried to google this information but I don't see what I want or maybe I don't know what I'm looking for. Once again I want to strictly extract the important data without the extra folder that is created to put the important data into.

Ex:
tar -jzvf test1.tar.bz2
/test1/data1
/test1/data2
/test1/data3
/test1/ect...

I want:
tar -jzvf test1.tar.bz2
/data1
/data2
/data3
/ect...


Thanks
tman144566 is offline   Reply With Quote
Old 05-16-2008   #2 (permalink)
raghaven.kumar
Linux Newbie
 
raghaven.kumar's Avatar
 
Join Date: Mar 2008
Location: Bangalore, India
Posts: 128
you cant do that since you compressed them with the folder test
if you want to that as you said, IMO, compress inside the test folder
i.e. ~/test$ tar -cvjf data.tar.bz2 data1 data2 data3
so on .....
raghaven.kumar is offline   Reply With Quote
Old 05-16-2008   #3 (permalink)
tman144566
Just Joined!
 
Join Date: May 2008
Posts: 3
Thanks that helped!
tman144566 is offline   Reply With Quote
Old 05-16-2008   #4 (permalink)
khafa
Linux Enthusiast
 
khafa's Avatar
 
Join Date: Apr 2008
Location: Tokyo, Japan
Posts: 612
actually you can do what you wanted to do in the first place
you do it as follows
Code:
tar --strip-components 1 -jxvf test1.tar.bz2
and test1 will be gone
__________________
Linux and me it's a love story
khafa is offline   Reply With Quote
Old 05-16-2008   #5 (permalink)
raghaven.kumar
Linux Newbie
 
raghaven.kumar's Avatar
 
Join Date: Mar 2008
Location: Bangalore, India
Posts: 128
hey thanks, I never knew that !!
raghaven.kumar is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 09:48 AM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0