57 lines
3.5 KiB
HTML
57 lines
3.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
|
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
|
<HEAD>
|
|
<TITLE>4.5.2 gzip and compress</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value="4.5.2 gzip and compress">
|
|
<meta name="keywords" value="gs">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html3986 HREF="node175.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3984 HREF="node172.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3978 HREF="node173.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3988 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3989 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3987 HREF="node175.html">4.5.3 Putting them together</A>
|
|
<B>Up:</B> <A NAME=tex2html3985 HREF="node172.html">4.5 Archiving and Compressing </A>
|
|
<B> Previous:</B> <A NAME=tex2html3979 HREF="node173.html">4.5.1 Using tar</A>
|
|
<BR> <HR> <P>
|
|
<H2><A NAME=SECTION00652000000000000000>4.5.2 gzip and compress</A></H2>
|
|
<P>
|
|
<A NAME=4667> </A>
|
|
<A NAME=4668> </A>
|
|
Unlike archiving programs for MS-DOS, <tt>tar</tt> does not automatically
|
|
compress files as it archives them. Therefore, if you are archiving
|
|
two 1-megabyte files, the resulting tar file will be two megabytes in
|
|
size. The <tt>gzip</tt> command may be used to compress a file (the file
|
|
to compress need not be a tar file). The command
|
|
<P><TT> # <em>gzip -9 backup.tar</em>
|
|
<P></TT>
|
|
will compress <tt>backup.tar</tt> and leave you with <tt>backup.tar.gz</tt>,
|
|
the compressed version of the file. The <tt>-9</tt> switch tells
|
|
<tt>gzip</tt> to use the highest compression factor.
|
|
<P>
|
|
The <tt>gunzip</tt> command may be used to uncompress a gzipped file.
|
|
Equivalently, you may use ``<tt>gzip -d</tt>''.
|
|
<P>
|
|
<tt>gzip</tt> is a relatively new tool in the UNIX community. For many
|
|
years, the <tt>compress</tt> command was used instead. However, because
|
|
of several factors<A NAME=tex2html808 HREF="footnode.html#4669"><IMG ALIGN=BOTTOM ALT="gif" SRC="foot_motif.gif"></A>, <tt>compress</tt>
|
|
is being phased out.
|
|
<P>
|
|
<tt>compress</tt>ed files end in the extension <tt>.Z</tt>. For example,
|
|
<tt>backup.tar.Z</tt> is the compressed version of <tt>backup.tar</tt>, while
|
|
<tt>backup.tar.gz</tt> is the gzipped version<A NAME=tex2html809 HREF="footnode.html#4670"><IMG ALIGN=BOTTOM ALT="gif" SRC="foot_motif.gif"></A>. The <tt>uncompress</tt> command is used to expand a
|
|
<tt>compress</tt>ed file; <tt>gunzip</tt> knows how to handle <tt>compress</tt>ed
|
|
files as well.
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html3986 HREF="node175.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3984 HREF="node172.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3978 HREF="node173.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3988 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3989 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3987 HREF="node175.html">4.5.3 Putting them together</A>
|
|
<B>Up:</B> <A NAME=tex2html3985 HREF="node172.html">4.5 Archiving and Compressing </A>
|
|
<B> Previous:</B> <A NAME=tex2html3979 HREF="node173.html">4.5.1 Using tar</A>
|
|
<BR> <HR> <P>
|
|
<BR> <HR>
|
|
<P><ADDRESS>
|
|
<I>Matt Welsh <BR>
|
|
mdw@sunsite.unc.edu</I>
|
|
</ADDRESS>
|
|
</BODY>
|