On Thu, Dec 23, 1999 at 11:29:53PM -0500, rpjday wrote:
> 
> On Thu, 23 Dec 1999, cajun wrote:
> 
> > Is it possible to direct a tar file to extract to a certain directory ?
> 
> i'm not sure i'd recommend doing this, but gnu tar has the
> "-P" or "--absolute-paths" option that will leave leading
> slashes on the filenames in the archive to guarantee that
> the restore is done to that absolute location.  is that what
> you were looking for?  just be warned that this removes the
> flexibility of restoring anywhere else.  you're better off
> cd'ing to the appropriate location first before running
> the restore.

GNU tar has a 'O' option:
        
        tar xOf tarfile.tar member.file > member.file

will extract a file named "member.file" from a tar file named "tarfile.tar",
write it to standard out which will then be redirected (by the shell) to
a file in the current directory named "member.file". 

With that you should be able to do what you want.

Fred
-- 
---- Fred Smith -- [EMAIL PROTECTED] ----------------------------
  "For him who is able to keep you from falling and to present you before his 
 glorious presence without fault and with great joy--to the only God our Savior
 be glory, majesty, power and authority, through Jesus Christ our Lord, before
                     all ages, now and forevermore! Amen."
----------------------------- Jude 1:24,25 (niv) -----------------------------


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to