old-www/HOWTO/Bzip2-4.html

73 lines
2.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Bzip2 mini-HOWTO: Using bzip2 with tar</TITLE>
<LINK HREF="Bzip2-5.html" REL=next>
<LINK HREF="Bzip2-3.html" REL=previous>
<LINK HREF="Bzip2.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="Bzip2-5.html">Next</A>
<A HREF="Bzip2-3.html">Previous</A>
<A HREF="Bzip2.html#toc4">Contents</A>
<HR>
<H2><A NAME="bzip2-with-tar"></A> <A NAME="s4">4. Using bzip2 with tar</A></H2>
<P>Listed below are three ways to use bzip2 with tar, namely
<H2><A NAME="ss4.1">4.1 Easiest to set up:</A>
</H2>
<P>This method requires no setup at all. To un-tar the bzip2'd tar archive,
foo.tar.bz2 in the current directory, do
<BLOCKQUOTE><CODE>
<PRE>
/path/to/bzip2 -cd foo.tar.bz2 | tar xf -
</PRE>
</CODE></BLOCKQUOTE>
or
<BLOCKQUOTE><CODE>
<PRE>
tar --use-compress-prog=bzip2 xf foo.tar.bz2
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>These work, but can be a PITA to type often.
<P>
<H2><A NAME="ss4.2">4.2 Easy to set up, fairly easy to use, no need for root privileges:</A>
</H2>
<P> Thanks to
<A HREF="mailto:leonard@sct1.is.belgacom.be">Leonard Jean-Marc</A> for the tip. Thanks also to
<A HREF="mailto:rubini@morgana.systemy.it">Alessandro Rubini</A> for
differentiating bash from the csh's.
<P>
<P>In your .bashrc, you can put in a line like this:
<BLOCKQUOTE><CODE>
<PRE>
alias btar='tar --use-compress-program /usr/local/bin/bzip2 '
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>In your .tcshrc, or .cshrc, the analogous line looks like this:
<BLOCKQUOTE><CODE>
<PRE>
alias btar 'tar --use-compress-program /usr/local/bin/bzip2'
</PRE>
</CODE></BLOCKQUOTE>
<P>
<H2><A NAME="ss4.3">4.3 Also easy to use, but needs root access.</A>
</H2>
<P>Update your tar to GNU's newest version, which is currently 1.13.10.
It can be found at
<A HREF="ftp://alpha.gnu.org/gnu/tar/">GNU's ftp site</A> or any mirror.
<P>
<HR>
<A HREF="Bzip2-5.html">Next</A>
<A HREF="Bzip2-3.html">Previous</A>
<A HREF="Bzip2.html#toc4">Contents</A>
</BODY>
</HTML>