tar.xhtml (1235B)
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!--#include file="/templates/head.shtml" -->
- <title>Differences between tar(1) implementations — lanodan’s cyber-home</title>
- </head>
- <body>
- <!--#include file="/templates/en/nav.shtml" -->
- <main>
- <h1>Differences between tar(1) implementations</h1>
- <h2>Autodetection of compression</h2>
- <ul>
- <li>libarchive and busybox autodetects for both files and pipes, without using a child process</li>
- <li>heirloom tar autodetects for both files and pipes, with using a child process for decompression</li>
- <li>GNU tar autodetects for both but throws an error for pipes</li>
- </ul>
- <p>
- Testing the pipes case:
- <ol>
- <li>Check cat isn't a shell builtin: <code>command -v cat</code></li>
- <li><code>cat foobar.tar.gz | tar tvf -</code></li>
- </ol>
- <code>cat(1)</code> used here to be sure it is pipes and not fd referring to a file.
- </p>
- <h2>See also</h2>
- <ul>
- <li>On the file formats side of things: <a href="https://dev.gentoo.org/~mgorny/articles/portability-of-tar-features.html">Portability of tar features - Michał Górny</a></li>
- </ul>
- </main>
- <!--#include file="/templates/en/footer.shtml" -->
- </body>
- </html>