LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-06-2004, 04:10 PM   #1
rickenbacherus
Member
 
Registered: Mar 2003
Location: colorado springs. colorado
Distribution: Debian-Sid 2.6.24-rt1
Posts: 290

Rep: Reputation: 30
extract single directory from .tgz


As it is this is what I have to do:

tar xzvf rox-lib-1.9.12.tgz && cd rox-lib-1.9.12 && mv ROX-Lib2 ~/lib && cd ..

Lots of horsing around there. Untar the file, cd into the untarred directory and then mv the ROX-Lib2 directory somewhere else. In other words, I want to tell tar to extract only ROX-Lib2 from rox-lib-1.9.12.tgz

Any ideas? Thaks.
 
Old 02-06-2004, 05:06 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Try this: tar -C ~/lib -xzvf rox-lib-1.9.12.tgz rox-lib-1.9.12/ROX-Lib2

This should put ROX-Lib2 into the ~/lib directory

edit:
Really, what this will do is create a ~/lib/rox-lib-1.9.12/ROX-Lib2
I don't know how to get away from the naming scheme within the archive.

Last edited by Berhanie; 02-07-2004 at 07:23 AM.
 
Old 02-07-2004, 10:37 AM   #3
rickenbacherus
Member
 
Registered: Mar 2003
Location: colorado springs. colorado
Distribution: Debian-Sid 2.6.24-rt1
Posts: 290

Original Poster
Rep: Reputation: 30
Thanks Berhanie. Unfortunately ~/lib/ROX-Lib2 is what I need. I'll keep at it.
 
  


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
how to extract tgz Longinus Linux - Newbie 14 12-21-2015 03:30 AM
Extract specific files from .tgz dgermann Linux - Newbie 6 08-25-2004 10:39 AM
how to extract file *.tgz vanhelsing Linux - Software 1 06-05-2004 06:07 AM
gunzip does not extract *.tgz nausicaa3000 AIX 6 02-07-2004 04:06 PM
how do i extract a .tgz ? lax2sman Linux - Networking 4 02-11-2002 04:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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