rCzq4gtxdD8A+NFCNlEVyZ49KHS8!kSCkg35RrOB52thD4wJB9v2bhQi3+3fATMU   
   laZbA4XdjYOfI4qTP9UOpAbg9IBCe2ye+Vn7f34l!sIbH   
   properly   
   From: "John Small"    
      
   On Sun, 12 Dec 2010 13:49:05 UTC, Lars Erdmann    
   wrote:   
      
   > Hallo,   
   >    
   > is there a command line switch so that tar IGNORES the paths of archived   
   files   
   > and instead extracts them to the current working directory ? Is there a newer   
   > version of tar that can do that ?   
   > I have version:   
   > GNU tar version 1.10 - AK 2.58   
      
   There are newer versions of TAR. (I have 1.20 installed here.) But I    
   am not aware that any version of TAR makes your task easy.   
      
   One way would be to use syntax of the form:   
   tar -Oxf [tar-file] [file-to-be-extracted] >[filename-to-extract-to]   
      
   This should work with any TAR and it will allow you to extract to any    
   directory, not just the current one. The downsides of this approach    
   are:   
   - One file at a time (wildcards won't work)   
   - The filename to be extracted must be known   
   - The extracted file will have the current date and time, not the date   
   and time it has in the archive.   
      
   A REXX wrapper could be written to   
   - Execute and capture the listing of the comtents, including the dates   
   and times of each file   
   - Extract the desired file(s) using the above syntax   
   - Reset the date and time for the file(s) to the proper values   
   A smart wrapper could even handle wildcards.   
      
      
   --    
      
   John Small   
      
      
   --- Internet Rex 2.31   
    * Origin: The gateway at Omicron Theta (1:261/20.999)   
|