Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 07-24-2005, 02:21 AM   #1
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
tar - extracting a single directory from a large archive?

I have this huge tar archive, zipped with bzip2. So its a *.tar.bz2 file. I'm trying to extract a single directory, test from the archive arch. The thing is like 4.6GB, and the test directory is probably 5MB. I can't tell if tar is "thinking" or "waiting for input".

I ran this:

$ ls -l
-rw-------    1 root    root    4.6GB   arch.tar.bz2
drw-------    1 root    root    4.0K    test
$mkdir tmp
$ cd tmp
$ tar xjvf ../arch.tar.bz2 test/*
Is this right? The archived directory 'test' has many subdirectories and files inside it.
Old 07-24-2005, 03:44 AM   #2
Senior Member
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47

tar -xvfz arch.tar.bz2 test

Last edited by heema; 07-24-2005 at 04:05 AM.


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 On
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
Extracting a tar ball directly into a directory kushalkoolwal Debian 2 09-28-2005 02:47 PM
Extracting tar.bz2 archive through console grim_chel Linux - Newbie 3 06-28-2004 12:27 PM
How do I decompress and desarchive multiple .tar.gz files to a single directory? Baldorg Linux - Software 7 11-27-2003 01:42 PM
tar - how to extact only a single file from a archive? bkeating Linux - Newbie 3 10-23-2003 04:42 PM

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration