wiki/files.archive.html
2022-07-29 15:41:17 +00:00

20 lines
10 KiB
HTML

<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>Archive files</title><script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script><script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script><script type="text/x-mathjax-config">
MathJax = {
tex: {
inlineMath: [ [&#x27;$&#x27;,&#x27;$&#x27;], [&#x27;\(&#x27;,&#x27;\)&#x27;] ],
displayMath: [ [&#x27;$$&#x27;,&#x27;$$&#x27;], [&#x27;[&#x27;,&#x27;]&#x27;] ]
},
options = {
processHtmlClass = &quot;math&quot;
}
}
</script><meta name="next-head-count" content="6"/><link rel="preload" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" as="style"/><link rel="stylesheet" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" data-n-g=""/><noscript data-n-css=""></noscript><link rel="preload" href="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" as="script"/></head><body><div id="__next"><main><h1>Archive files</h1><section class="post-metadata"><span>Date: <!-- -->2021-06-18 18:50:14 +08:00</span><span>Date modified: <!-- -->2021-07-20 23:28:42 +08:00</span></section><nav class="toc"><ol class="toc-level toc-level-1"></ol></nav><p>Archive files are good for saving some space and reducing the files needed for transfer.
Nowadays, there are a lot of archive formats.
Having worked with multiple of them, it can be confusing.
</p><p>I&#x27;ll just track them with this file.
</p><p>Take note that not all files are stored with the file extension.
If it lacks the extension, inspect the file with the magic number.
You can do that with any file inspection tools like <code class="inline-verbatim">file.1</code>.
</p><table><thead><tr><th>Format</th><th>File extension</th><th>Command to extract</th></tr></thead><tbody><tr><td>Gunzip</td><td><code class="inline-verbatim">.gz</code>, <code class="inline-verbatim">.gzip</code></td><td><code class="inline-code">tar -zxf $FILE</code>, <code class="inline-code">gunzip -c $FILE</code></td></tr><tr><td>ZIP</td><td><code class="inline-verbatim">.zip</code></td><td><code class="inline-code">unzip $FILE</code></td></tr><tr><td>Zstd</td><td><code class="inline-verbatim">.zst</code></td><td><code class="inline-code">tar --zstd xf $FILE</code></td></tr><tr><td>xz</td><td><code class="inline-verbatim">.xz</code></td><td><code class="inline-code">tar --xz xf $FILE</code></td></tr><tr><td>ISO</td><td><code class="inline-verbatim">.iso</code></td><td></td></tr></tbody></table><p>There are also some libraries and applications for certain types of files.
</p><ul><li><p><a href="https://www.libarchive.org/">libarchive</a> is a library that supports <a href="https://github.com/libarchive/libarchive/wiki/LibarchiveFormats">multiple archive formats</a></p></li><li><p><a href="http://www.gnu.org/software/tar/">GNU tar</a> is the most popular utility for extracting archives
</p></li></ul></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"metadata":{"date":"\"2021-06-18 18:50:14 +08:00\"","date_modified":"\"2021-07-20 23:28:42 +08:00\"","language":"en","source":""},"title":"Archive files","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Archive files are good for saving some space and reducing the files needed for transfer.\nNowadays, there are a lot of archive formats.\nHaving worked with multiple of them, it can be confusing.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"I'll just track them with this file.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Take note that not all files are stored with the file extension.\nIf it lacks the extension, inspect the file with the magic number.\nYou can do that with any file inspection tools like "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"file.1"}]},{"type":"text","value":".\n"}]},{"type":"element","tagName":"table","properties":{},"children":[{"type":"element","tagName":"thead","properties":{},"children":[{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Format"}]},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"File extension"}]},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Command to extract"}]}]}]},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Gunzip"}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":".gz"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":".gzip"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"tar -zxf $FILE"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"gunzip -c $FILE"}]}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"ZIP"}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":".zip"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"unzip $FILE"}]}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Zstd"}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":".zst"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"tar --zstd xf $FILE"}]}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"xz"}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":".xz"}]}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-code"]},"children":[{"type":"text","value":"tar --xz xf $FILE"}]}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"ISO"}]},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":".iso"}]}]},{"type":"element","tagName":"td","properties":{},"children":[]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"There are also some libraries and applications for certain types of files.\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://www.libarchive.org/"},"children":[{"type":"text","value":"libarchive"}]},{"type":"text","value":" is a library that supports "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/libarchive/libarchive/wiki/LibarchiveFormats"},"children":[{"type":"text","value":"multiple archive formats"}]}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"http://www.gnu.org/software/tar/"},"children":[{"type":"text","value":"GNU tar"}]},{"type":"text","value":" is the most popular utility for extracting archives\n"}]}]}]}]},"backlinks":[]},"__N_SSG":true},"page":"/[[...slug]]","query":{"slug":["files.archive"]},"buildId":"Ie9t5zutrXP6Of75Cb5xF","assetPrefix":"/wiki","nextExport":false,"isFallback":false,"gsp":true}</script><script nomodule="" src="/wiki/_next/static/chunks/polyfills-99d808df29361cf7ffb1.js"></script><script src="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" async=""></script><script src="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" async=""></script><script src="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" async=""></script><script src="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" async=""></script><script src="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" async=""></script><script src="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" async=""></script><script src="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" async=""></script><script src="/wiki/_next/static/Ie9t5zutrXP6Of75Cb5xF/_buildManifest.js" async=""></script><script src="/wiki/_next/static/Ie9t5zutrXP6Of75Cb5xF/_ssgManifest.js" async=""></script></body></html>