Compressing and Archiving
97
kali >
gunzip HackersArise.*
Once uncompressed, the file is no longer saved with the
.tar.gz exten-
sion but with the
.tar extension instead. Also, notice that it has returned to
its original size of 40,960 bytes. Try doing a long list to confirm this.
Compressing with bzip2
Another of the other widely used compression utilities in Linux is
bzip2
,
which works similarly to
gzip
but has better compression ratios, mean-
ing that the resulting file will be even smaller. You can compress your
HackersArise.tar file by entering the following:
kali >
bzip2 HackersArise.*
When you do a long listing, you can see that
bzip2
has compressed the
file down to just 2,081 bytes! Also note that the file extension is now
.tar.bz2.
To uncompress the compressed file, use
bunzip2
, like so:
kali >