LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-20-2006, 06:37 AM   #1
Suinatsa
Member
 
Registered: Jul 2004
Distribution: Slackware, Suse
Posts: 46

Rep: Reputation: 15
(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
 
Old 06-20-2006, 06:54 AM   #2
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
Code:
tar xf file.tar path/of/dir/in/archive
more generally
Code:
tar xf file.tar [fileOrDirToExtract]
 
Old 06-20-2006, 07:09 AM   #3
Suinatsa
Member
 
Registered: Jul 2004
Distribution: Slackware, Suse
Posts: 46

Original Poster
Rep: Reputation: 15
Thanks that's what I needed!
 
  


Reply

Tags
archive, backup, directory, folder, tar



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
old tar? archive maenho Linux - Software 4 12-14-2006 07:05 PM
tar - extracting a single directory from a large archive? lowpro2k3 Linux - General 1 07-24-2005 02:44 AM
Tar gives error when creating a tar file archive davidas Linux - Newbie 10 04-13-2004 12:35 AM
this doesn't look like a tar archive .phister Slackware 5 02-01-2004 01:19 AM
Tar archive issues yorkb Linux - Software 1 10-12-2003 05:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration