The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
if else command syntax error c0384 Shell Programming and Scripting 4 05-18-2007 10:29 AM
Perl command syntax for C:\dir asabzevari Shell Programming and Scripting 1 05-19-2006 01:21 AM
until command syntax error 435 Gavea Shell Programming and Scripting 3 01-03-2006 08:49 PM
Command syntax dsimpg1 UNIX for Dummies Questions & Answers 2 02-17-2005 02:13 PM
command syntax pmap UNIX for Dummies Questions & Answers 3 01-09-2002 11:06 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-02-2001
baunocj baunocj is offline
Registered User
  
 

Join Date: May 2001
Location: Phoenix
Posts: 1
I am trying to extract a file using tar. I cd'ed to the directory I wanted to start in. I had the tar file in the same directory. I executed tar xvf filename . It appeared that it was extracting into the directory the tar file was created from instead of into the directory I was in. How do I get tar to extract where I want? I looked at the man page and I have 2 books for help but I don't see what I did wrong.
thanks, john
  #2 (permalink)  
Old 05-02-2001
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,709
If the tarfile was created with directories in the archive, then those directories will be untarred when you do the untar boogie-woogie. Most people do this:

Code:
tar tvf filename | more
This allows them to examine the tarfile to see how it is structured before untarring. Then, they untar and move or rename directories as required. You can force tar to untar in another directory, but will still get the archived directories when you untar.

So, even if there is gold at the end of a filetree in the tarfile and you want only the gold, you have to untar the entire filesystem used in the creation to get to the gold!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate 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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0