Quick-Start Guide

Unzipping, the Unix way

(Appendix to the Freeciv Quickstart Guide.)

Directory trees with sets of files can be stored and compressed into a single file. On MS Windows, the most popular file format to do this is .zip file format; perhaps you are familiar with utilities to handle it.
On Unix-like systems, the collapsing of directory trees into a single one and the compression are two separate processes. The most popular way of collapsing directory trees uses the tar command; the resulting tar archive is usually compressed using the gzip utility, or else, the slower but better compressing bzip2.
Some versions of the tar command can handle gzip or even bzip2 compression; other versions cannot.
So how to unpack the Freeciv source code - or any other compressed tar archive?
.tar.bz2 archives:
    tar jxvf whatever.tar.bz2 or
    tar Ixvf whatever.tar.bz2
if your tar understands .bz2 compression;
    bunzip2 -c whatever.tar.bz2 | tar xvf -
if it doesn't; if your system doesn't even have bunzip2, install it.
.tar.gz archives:
    tar zxvf whatever.tar.gz
if your tar understands .gz compression;
    gunzip -c whatever.tar.gz | tar xvf -
if it doesn't; if your system doesn't even have gunzip, install it.
(The original Unix uncompress command is required to unpack .tar.Z archives, but these are rarely used today and we don't use them for Freeciv.)
These commands will usually unpack all files into a separate, new subdirectory with the same name as the archive filename without extensions. This is not always the case; the Freeciv CVS snapshots, for instance, unpack into the freeciv/ directory.


--------