View previous topic :: View next topic |
Author |
Message |
MHenry676 Tux's lil' helper
Joined: 02 Aug 2004 Posts: 125
|
Posted: Mon Aug 01, 2005 1:24 am Post subject: How to extract a file from a tar.bz2 archive? |
|
|
I need to extract my /etc/portage/package.keywords file from a recent stage4 backup tar.bz2 file. I tried a few ways, but can't seem to get it right. What command can I use to extract this file from this archive? _________________ ASUS A7N8X-E DLX | Mobile Athlon XP 2500 @ 2.5GHz | 1GB OCZ Gold 2-2-2-5 | GeForce 6800
HOWTO Fully Automated USB mounting using udev (WIP) |
|
Back to top |
|
|
smitty_one_each Tux's lil' helper
Joined: 21 Mar 2004 Posts: 94 Location: Right coast, halfway up
|
Posted: Mon Aug 01, 2005 1:29 am Post subject: |
|
|
for backup.tar.bz2,
>tar -xvjf backup.tar.bz2
unless your tar is older, in which case you might
>bzcat backup.tar.bz2 | tar -xv
go forth and rock!
Chris _________________ I'm just looking for clues at the scene of the crime.--Walsh |
|
Back to top |
|
|
Syque Tux's lil' helper
Joined: 15 Aug 2004 Posts: 110
|
Posted: Mon Aug 01, 2005 2:14 am Post subject: |
|
|
Try:
tar -xjvf backup.tar.bz2 '*package.keywords'
which will extract only those files in the tar archive ending with the pattern package.keywords.
(the command smitty_one_each gave will extract the whole archive). |
|
Back to top |
|
|
|