VH/PF/xM4I8exwH8XPmbQ9MYG0Zo!VYFfbQ+KTRIpvhsjH9xkSAb8GJzD84ykNKZ   
   HHjksGGwtNyu8f2i+bCqMRdv/jjM5nCo2GARMy4f!ET1w   
   properly   
   From: "John Small"    
      
   On Sun, 12 Dec 2010 15:17:23 UTC, Marcel Mller    
    wrote:   
      
   > Lars Erdmann wrote:   
   > > is there a command line switch so that tar IGNORES the paths of archived    
   > > files and instead extracts them to the current working directory ?   
   >    
   > --substitute is your friend.   
      
   I cannot seem to get --substitute to work in the way the OP desires    
   (i.e. extract a file that has a path in the archive into the current    
   directory). I tried   
   tar --substitute=dirname,. -xf tarfile dirname/filename   
   but it complains that the dirname/filename is "not found in archive".    
   Am I using --substitute incorrectly?   
      
   Also, tar 1.20 does not seem to support --substitute. It goes have    
   --strip-components which seems to be able to strip the specified    
   number levels of directory names from the archived name.    
   --strip-components is not a full, exact replacement for --substitute    
   but it could be used to do what the the OP desires. (And it is an    
   improvement over my earlier suggestion to use -O since the date and    
   time stamps are preserved.)   
      
   --    
      
   John Small   
      
      
   --- Internet Rex 2.31   
    * Origin: The gateway at Omicron Theta (1:261/20.999)   
|