LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   tar - extracting a single directory from a large archive? (http://www.linuxquestions.org/questions/linux-general-1/tar-extracting-a-single-directory-from-a-large-archive-346146/)

lowpro2k3 07-24-2005 01:21 AM

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:

Code:

$ 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.

heema 07-24-2005 02:44 AM

try:

tar -xvfz arch.tar.bz2 test


http://library.n0i.net/linux-unix/ap....12/tar_2.html


All times are GMT -5. The time now is 09:51 PM.