Re: Tar on Windows XP



Rob

Yes that worked! I was using Tar 1.07, which didn't have the
DO_NOT_USE_PREFIX feature, so I've now installed Tar 1.30.

Thanks for your help.

David

"Sisyphus" <sisyphus1@xxxxxxxxxxxxxxxxx> wrote in message
news:45bec765$0$9776$afc38c87@xxxxxxxxxxxxxxxxxxxxxxx

"David Walker" <david@xxxxxxxxxxx> wrote in message
news:Gxuvh.18350$8j7.13192@xxxxxxxxxxxxxxxxxxxxxxx
Hi

I am trying to create a tar archive on Windows XP with the Perl code
below. However, when I look at the archive created (using WinZip 10.0)
all the directory information is lost, and when I untar it using WinZip
all I get is all the files in the same directory. Can some kind person
please tell me how I can create the tar file so that when it is untar'd
the directory structure will be preserved.


From the "FAQ" section in 'perldoc Archive::Tar' :

-- quote --
I'm using WinZip, or some other non-POSIX client, and files are not
being extracted properly!
By default, "Archive::Tar" is in a completely POSIX-compatible
mode,
which uses the POSIX-specification of "tar" to store files. For
paths greather than 100 characters, this is done using the "POSIX
header prefix". Non-POSIX-compatible clients may not support this
part of the specification, and may only support the "GNU Extended
Header" functionality. To facilitate those clients, you can set the
$Archive::Tar::DO_NOT_USE_PREFIX variable to "true". See the
"GLOBAL
VARIABLES" section for details on this variable.
-- end quote --

Hopefully, that deals with the problem you're facing. (If not, let us
know - and also tell us which version of Archive::Tar you have.).)

Cheers,
Rob



.



Relevant Pages

  • Re: Tar on Windows XP
    ... I am trying to create a tar archive on Windows XP with the Perl code ... and when I untar it using WinZip all I ... I'm using WinZip, or some other non-POSIX client, and files are not ... and may only support the "GNU Extended ...
    (comp.lang.perl.misc)
  • Re: Anybody know an alternative to WinZip?
    ... >> Preferably some gnu open source thing. ... ie "tar xvzf file.tar.gz" ... And I hear that winzip doesn't handle ... tar archives well... ...
    (alt.gathering.rainbow)
  • Re: Why we always make tar files and zip in unix environment
    ... > I didn't mean to infer that tar alone compresses files, ... > it has shortcomings as an archive utility. ... > to modify a tar file's contents through winzip - I can't say it ...
    (comp.unix.shell)
  • Re: Why we always make tar files and zip in unix environment
    ... We dropped the use of tar in installs because zip ... > Tar does not compress files, it simply archives the files and file ... > I seem to recall, from my windows days, that winzip, the ...
    (comp.unix.shell)
  • Re: Creating a zip file
    ... | I am trying to create a zip file that can be unziped on a Windows machine. ... .tar, .tar.gz, .tgz are supported by WinZIP. ...
    (freebsd-questions)