Summary: extract tar to different directory - please help

From: Ivan Williams <>
Date: Wed May 18 2005 - 12:05:12 EDT
A lot of people wrote telling me to using gnu tar and
that is the route I took.  After extracting the
tarball, I then had d/e/f/a/b/c directories and had to
mv the files to the appropriate directory and them
rmdir the recursive directories.

Thanks Everyone


[Bills reply]

Use GNU tar (gtar) to extract the tarball. By default
it will strip absolute paths (leading /). So, you can
go to some work area, gtar -x... to extract to here
(.) and the move things wherever you want them. 

GNU tar is delivered in the SUNWgtar package. Mine (on
Solaris 9) is: /usr/sfw/bin/gtar 

Original Post:

Greetings I have a tar file which was created using
tar xvf and it has the path names stored within the
tar file. I need to restore the files to a different
directory without overwriting the original directory
and thus far have been unsuccessful. 
example - tarred using tar cvf /a/b/c/* test.tar 
now I need to untar in /d/e/f 
tried using 
tar xvf /a/b/c/test.tar /d/e/f/ but no luck - can
anyone advise? 
Tired of spam?  Yahoo! Mail has the best spam protection around 
sunmanagers mailing list
Received on Wed May 18 12:05:34 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:47 EST