LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   (un)tar a certain directory from an archive (http://www.linuxquestions.org/questions/linux-software-2/un-tar-a-certain-directory-from-an-archive-456515/)

Suinatsa 06-20-2006 06:37 AM

(un)tar a certain directory from an archive
 
Hey guys,
I have a huge backup archive which contains 4 different folders. Now I only need one of the folders.
The tar file is to big to be extracted as a whole. It would take too long so how can I only extract a certain directory from a tar file?

I tried

tar xf file.tar --exlude 'directory/*' --exclude directory *

but that did not work!

THX

Suinatsa

zeitounator 06-20-2006 06:54 AM

Code:

tar xf file.tar path/of/dir/in/archive
more generally
Code:

tar xf file.tar [fileOrDirToExtract]

Suinatsa 06-20-2006 07:09 AM

Thanks that's what I needed!


All times are GMT -5. The time now is 05:07 PM.