Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

As suggested earlier (11/03/2008), I modified my Perl script to use GNU Tar instead of Archive::Tar::Streamed and it worked fine for the Linux installation. So, I downloaded GNU Tar for Windows from Sourceforge, installed it, and promptly discovered that GNU Tar doesn't like volume designations in full paths. That is, GNU Tar fails when I try to create a tar archive using a fully qualified path like "c:\temp\playtar.tar", but it works if I omit the volume like "\temp\playtar.tar". This software is going on a customer's rather beefy Windows system and they have multiple volumes in use. Again, my employer has mandated a Tar solution. Any ideas?

  • Comment on Lightweight, Platform-Independant Tar (Part 2)

Replies are listed 'Best First'.
Re: Lightweight, Platform-Independant Tar (Part 2)
by BrowserUk (Patriarch) on Nov 06, 2008 at 16:49 UTC

    The tar utility that comes as a part of UnxUtils is a "native port" and accepts fully specified paths. Eg. This works fine:

    tar -cf c:\X.tar X

    I've generally found these native ports work better (from cmd.exe) than those that rely upon the cygwin dlls.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: Lightweight, Platform-Independant Tar (Part 2)
by Bloodnok (Vicar) on Nov 06, 2008 at 17:07 UTC
    Once upon a time, I played around with using jar files as a platform agnostic solution since tar(1) understands jar files...that was, admittedly in an environment whereby java was installed on every machine to which deliveries had to be made.

    IIRC, I even prototyped an ABI package lookalike solution using that as a basis.

    A user level that continues to overstate my experience :-))
      A .jar file is actually a .zip file plus some extras in its content (I think a MANIFEST file, but I'm not sure that's all...?). And .zip and .gz are related, they're both handled by zlib (and thus, by Compress::Zlib too — usually through Archive::Zip). Plenty of tar binaries can directly handle .tar.gz, compressed .tar files. So maybe there is your link.
Re: Lightweight, Platform-Independant Tar (Part 2)
by Anonymous Monk on Nov 06, 2008 at 20:13 UTC
    Ahh...Thank you very much, BrowserUk! The native port of Tar in UnxUtils works perfectly!