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

Notices

Reply
 
Search this Thread
Old 07-24-2005, 01:21 AM   #1
lowpro2k3
Member
 
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:

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.
 
Old 07-24-2005, 02:44 AM   #2
heema
Senior Member
 
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 46
try:

tar -xvfz arch.tar.bz2 test


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

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


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


All times are GMT -5. The time now is 10:51 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 Google+: linuxquestions
Open Source Consulting | Domain Registration