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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-29-2007, 02:37 PM
|
#1
|
|
LQ Newbie
Registered: Sep 2004
Distribution: Libranet 2.81
Posts: 24
Rep:
|
Is it possible to unpack a *.tar into a specific directory
When I unpack my *.tar files it recreates the directory in which the files were orginally stored. I need them to unpack in a different directory. I've tried the -C switch, but these doesn't seem to work -- I find the man page unclear, so perhaps I'm doing this wrong. Any suggestions?
|
|
|
|
01-29-2007, 02:49 PM
|
#2
|
|
Member
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254
Rep:
|
Yeah, the -C switch will do it, but maybe you've used it wrong. Try this:
tar xf archive.tar -C /tmp
|
|
|
|
01-29-2007, 03:00 PM
|
#3
|
|
LQ Newbie
Registered: Sep 2004
Distribution: Libranet 2.81
Posts: 24
Original Poster
Rep:
|
Yeah, that's what I did. It still adds all the other subdirectories. E.g., if the files were originally in /home/bill/junk the the -C /tmp option puts them in /tmp/home/bill/junk -- what I want is for them to just be in /tmp. (I may well be asking tar to do something it cannot, and should not do!)
|
|
|
|
01-29-2007, 06:04 PM
|
#4
|
|
Member
Registered: Nov 2006
Location: Virginia
Distribution: OpenSuSE 10.2
Posts: 121
Rep:
|
I think the point of TAR is to unroll it's tarballs the way they were rolled up. It usually being somewhat important that the tarball was created with the original diretories rolled into it. That said, I do think Gnome's "File Roller" utility does give the option of not recreating directories, so that all contents of the tarball spill out into the specified directory,
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:22 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|