LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
LinkBack Search this Thread
Old 10-15-2006, 01:29 PM   #1
oldsko0l
Member
 
Registered: Feb 2006
Location: Belgium
Distribution: Ubuntu Dapper, Gentoo 2006.1
Posts: 140

Rep: Reputation: 15
extract 1 file out of a .tar.bz2


Hi everyone,
I have a .tar.bz2 from my previous system (a backup)
can someone tell my how to get 1 file out of there without extracting the whole file? thanks
 
Old 10-15-2006, 01:53 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,853

Rep: Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121
just put the file name at the end of the command line
 
Old 10-15-2006, 02:18 PM   #3
oldsko0l
Member
 
Registered: Feb 2006
Location: Belgium
Distribution: Ubuntu Dapper, Gentoo 2006.1
Posts: 140

Original Poster
Rep: Reputation: 15
Code:
tar xvjf package.tar.bz2 /etc/X11/xorg.conf
for example?
 
Old 10-15-2006, 02:40 PM   #4
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 31
Quote:
tar xvjf package.tar.bz2 /etc/X11/xorg.conf
Yep !

If you have a GUI tool like "ark" installed, you can use it to browse and extract the files you want.
 
Old 10-15-2006, 03:02 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,853

Rep: Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121
you wouldn't have an absolute path, as there aren't absloulte paths in tar's... it's be etc/whatever not /etc/whatever
 
Old 10-15-2006, 03:21 PM   #6
oldsko0l
Member
 
Registered: Feb 2006
Location: Belgium
Distribution: Ubuntu Dapper, Gentoo 2006.1
Posts: 140

Original Poster
Rep: Reputation: 15
oldsko0l@localhost ~/stage4 $ tar xvjf localhost-stage4-2006.10.04-custom.tar.bz2 etc/X11/xorg.conf

& then it just 'keeps working'

it does not stop...
 
Old 10-15-2006, 03:33 PM   #7
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 31
Quote:
you wouldn't have an absolute path, as there aren't absloulte paths in tar's... it's be etc/whatever not /etc/whatever
Ooops ! Looks like I missed a slash !! Damned Guinness ! A bit strong on me ! ;-)
 
Old 10-15-2006, 06:14 PM   #8
dracolich
Senior Member
 
Registered: Jul 2005
Location: Va Beach
Distribution: Slackware
Posts: 1,159

Rep: Reputation: 47
I usually do this from Midnight Commander (mc) at a console or in a terminal window. On one side navigate to where you want to extract the file to. Tab to the other side and go to where the .bz2 file is. When you press enter on it it opens just like a directory and you can continue to browse to the file you want. Select the file and hit F5 to copy it. Works with bz2, gz, zip and probably others as well.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to extract a "tar.bz2" file? deWin Linux - Newbie 11 11-04-2009 11:55 PM
How to Extract a .xml.bz2 file? en3r0 Linux - Software 2 02-21-2006 09:46 PM
tar.bz2 Fails To Extract carlosinfl Linux - General 6 10-16-2005 12:33 PM
extract .tar.bz2 EcceVery Debian 3 11-24-2004 12:39 PM
How to extract tar.bz2 files? akihandyman Linux - Newbie 3 12-21-2003 03:17 PM


All times are GMT -5. The time now is 12:53 AM.

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