mirror of
git://slackware.nl/current.git
synced 2024-12-27 09:59:16 +01:00
75a4a592e5
Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun!
145 lines
5.2 KiB
HTML
145 lines
5.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org" />
|
|
<title>Archive Files</title>
|
|
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" />
|
|
<link rel="HOME" title="Slackware Linux Essentials" href="index.html" />
|
|
<link rel="PREVIOUS" title="Keeping Current" href="security-current.html" />
|
|
<link rel="NEXT" title="bzip2" href="archive-files-bzip2.html" />
|
|
<link rel="STYLESHEET" type="text/css" href="docbook.css" />
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
</head>
|
|
<body class="CHAPTER" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"
|
|
alink="#0000FF">
|
|
<div class="NAVHEADER">
|
|
<table summary="Header navigation table" width="100%" border="0" cellpadding="0"
|
|
cellspacing="0">
|
|
<tr>
|
|
<th colspan="3" align="center">Slackware Linux Essentials</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="10%" align="left" valign="bottom"><a href="security-current.html"
|
|
accesskey="P">Prev</a></td>
|
|
<td width="80%" align="center" valign="bottom"></td>
|
|
<td width="10%" align="right" valign="bottom"><a href="archive-files-bzip2.html"
|
|
accesskey="N">Next</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr align="LEFT" width="100%" />
|
|
</div>
|
|
|
|
<div class="CHAPTER">
|
|
<h1><a id="ARCHIVE-FILES" name="ARCHIVE-FILES"></a>Chapter 15 Archive Files</h1>
|
|
|
|
<div class="TOC">
|
|
<dl>
|
|
<dt><b>Table of Contents</b></dt>
|
|
|
|
<dt>15.1 <a href="archive-files.html#ARCHIVE-FILES-GZIP"><tt
|
|
class="COMMAND">gzip</tt></a></dt>
|
|
|
|
<dt>15.2 <a href="archive-files-bzip2.html"><tt class="COMMAND">bzip2</tt></a></dt>
|
|
|
|
<dt>15.3 <a href="archive-files-tar.html"><tt class="COMMAND">tar</tt></a></dt>
|
|
|
|
<dt>15.4 <a href="archive-files-zip.html"><tt class="COMMAND">zip</tt></a></dt>
|
|
</dl>
|
|
</div>
|
|
|
|
<div class="SECT1">
|
|
<h1 class="SECT1"><a id="ARCHIVE-FILES-GZIP" name="ARCHIVE-FILES-GZIP">15.1 <tt
|
|
class="COMMAND">gzip</tt></a></h1>
|
|
|
|
<p><tt class="COMMAND">gzip</tt>(1) is the GNU compression program. It takes a single
|
|
file and compresses it. The basic usage is as follows:</p>
|
|
|
|
<table border="0" bgcolor="#E0E0E0" width="100%">
|
|
<tr>
|
|
<td>
|
|
<pre class="SCREEN">
|
|
<samp class="PROMPT">%</samp> <kbd class="USERINPUT">gzip <var
|
|
class="REPLACEABLE">filename</var></kbd>
|
|
</pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>The resulting file will be named <tt class="FILENAME"><var
|
|
class="REPLACEABLE">filename</var>.gz</tt> and will usually be smaller than the input
|
|
file. Note that <tt class="FILENAME">filename.gz</tt> will replace <tt
|
|
class="FILENAME">filename</tt>. This means that <tt class="FILENAME">filename</tt> will
|
|
no longer exist, even though a gzipped copy will. Regular text files will compress
|
|
nicely, while jpeg images, mp3s, and other such files will not compress too well as they
|
|
are already compressed. This basic usage is a balance of final file size and compression
|
|
time. The maximum compression can be achieved like so:</p>
|
|
|
|
<table border="0" bgcolor="#E0E0E0" width="100%">
|
|
<tr>
|
|
<td>
|
|
<pre class="SCREEN">
|
|
<samp class="PROMPT">%</samp> <kbd class="USERINPUT">gzip -9 <var
|
|
class="REPLACEABLE">filename</var></kbd>
|
|
</pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>This will take a longer time to compress the file, but the result will be as small as
|
|
<tt class="COMMAND">gzip</tt> can make it. Using lower values for the command line option
|
|
will cause it to compress faster, but the file will not be as compressed.</p>
|
|
|
|
<p>Decompressing gzipped files can be done using two commands, which are really just the
|
|
same program. <tt class="COMMAND">gzip</tt> will decompress any file with a recognized
|
|
file extension. A recognized extension can be any of the following: <tt
|
|
class="FILENAME">.gz</tt>, <tt class="FILENAME">-gz</tt>, <tt class="FILENAME">.z</tt>,
|
|
<tt class="FILENAME">-z</tt>, <tt class="FILENAME">.Z</tt>, or <tt
|
|
class="FILENAME">-Z</tt>. The first method is to call <tt class="COMMAND">gunzip</tt>(1)
|
|
on a file, like so:</p>
|
|
|
|
<table border="0" bgcolor="#E0E0E0" width="100%">
|
|
<tr>
|
|
<td>
|
|
<pre class="SCREEN">
|
|
<samp class="PROMPT">%</samp> <kbd class="USERINPUT">gunzip <var
|
|
class="REPLACEABLE">filename.gz</var></kbd>
|
|
</pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>This will leave a decompressed version of infile in the current directory, and the <tt
|
|
class="FILENAME">.gz</tt> extension will be stripped from the filename. <tt
|
|
class="COMMAND">gunzip</tt> is really part of <tt class="COMMAND">gzip</tt> and is
|
|
identical to <tt class="COMMAND">gzip -d</tt>. As such, <tt class="COMMAND">gzip</tt> is
|
|
often pronounced <tt class="COMMAND">gunzip</tt>, as that name just sounds cooler.
|
|
:^)</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="NAVFOOTER">
|
|
<hr align="LEFT" width="100%" />
|
|
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0"
|
|
cellspacing="0">
|
|
<tr>
|
|
<td width="33%" align="left" valign="top"><a href="security-current.html"
|
|
accesskey="P">Prev</a></td>
|
|
<td width="34%" align="center" valign="top"><a href="index.html"
|
|
accesskey="H">Home</a></td>
|
|
<td width="33%" align="right" valign="top"><a href="archive-files-bzip2.html"
|
|
accesskey="N">Next</a></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="33%" align="left" valign="top">Keeping Current</td>
|
|
<td width="34%" align="center" valign="top"> </td>
|
|
<td width="33%" align="right" valign="top"><tt class="COMMAND">bzip2</tt></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|