How To Uncompress Linux Archive Files
Most of the time when you download files from Linux Software Directories, or when you get source code to compile, you end yourself with archive files that you need to uncompress.
In this article we will learn, or remember ourself, how to uncompress linux files compressed with the most common Linux file compression software: Gzip, Bzip and Xz.
Gzip, Bzip and Xz:
Gzip is certainly the most used Linux file compression software. Gzip is often used to compress files that have been put together with Tar. Most Unix operating systems make use of Gzip, or of similar programs based on the deflate compression algorithm.
NAME
gzip, gunzip, zcat - compress or expand
.gz .tar.gz and .tgz files
SYNOPSIS
gzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ... ]
gunzip [ -acfhlLnNrtvV ] [-S suffix] [ name ... ]
zcat [ -fhLV ] [ name ... ]
Bzip2 is a popular alternative to Gzip. People tend to prefer it over Gzip mainly because of its really efficient compression algorithm, and then its ability to produce smaller file archives.
NAME
bzip2, bunzip2 - a block-sorting file compressor
bzcat - decompresses files to stdout
bzip2recover - recovers data from damaged bzip2 files
SYNOPSIS
bzip2 [ -cdfkqstvzVL123456789 ] [ filenames ... ]
bzip2 [ -h|--help ]
bunzip2 [ -fkvsVL ] [ filenames ... ]
bunzip2 [ -h|--help ]
bzcat [ -s ] [ filenames ... ]
bzcat [ -h|--help ]
bzip2recover filename
Xz is becoming rather popular now-days. For example the official Gnome FTP software archive is now offering for download Xz compressed archives rather than Gzip ones.
NAME
xz, unxz, xzcat, lzma, unlzma,
lzcat - Compress or decompress .xz and .lzma files
SYNOPSIS
xz [option]... [file]...
unxz is equivalent to xz --decompress.
xzcat is equivalent to xz --decompress --stdout.
lzma is equivalent to xz --format=lzma.
unlzma is equivalent to xz --format=lzma --decompress.
lzcat is equivalent to xz --format=lzma --decompress --stdout.
And finally Zip, rarely used on Linux systems.
NAME
zip - package and compress (archive) files
unzip - list, test and extract compressed files in a ZIP archive
Identifying archive types by file extension
Looking at the extension of a linux archive is an easy way to identify the software that was used to compress it.
Gzip compressed file extensions:
- .gz
- .tar.gz
- .tgz
Bzip compressed file extensions:
- .bz2
- .tar.bz2
Xz compressed file extensions:
- .xz
- .tar.xz
Uncompressing Gzip files
Use gunzip for single files...
$ gunzip filename.gz
or tar for archives (.tar.gz or .tgz)
$ tar xvfz filename.tar.gz
Options:
- x: extract files from tar archive
- v: verbosely list files processed ( may be omitted )
- f: use archive file
- z: use gunzip to uncompress archive -- this is the important one.
Uncompressing Bzip files
Use bunzip2 for single files...
$ bunzip2 filename.gz
or tar for archives (.tar.bz2)
$ tar xvfj filename.tar.bz2
Options:
- x: extract files from tar archive
- v: verbosely list files processed ( may be omitted )
- f: use archive file
- j: use bzip2 to uncompress archive -- notice: j is lowercase.
Uncompressing Xz files
Use xz for single files...
$ xz --decompress filename.gz
or tar for archives (.tar.xz)
$ tar xvfJ filename.tar.xz
Options:
- J: use xz to uncompress archive -- notice: J is uppercase.
Uncompressing Zip files
This one is pretty obvious, you just need to use unzip:
$ unzip filename.zip


Gcc 4.8.0
Wine 1.5.30
Red Hat Linux 9.0
Apache Server 2.4.4
Damn Small Linux 4.4.10
Linux Kernel 2.6 2.6.39.4
Apache Tomcat 7.0.40
VLC media player 2.0.6
Qt 5.0.2
BackTrack 5r3
MySQL 4.0.27
OpenSSH 6.2
Syslinux 4.05
Squid 3.2.10
GLib2 2.36.2
GNOME 3.8.2
Glibc 2.17.0
Aircrack-ng 1.1
EAGLE 6.2.0
PhpMyAdmin 4.0.1
Favicon generator
Explorez toute l'actualité des mondes high-tech, formez-vous aux nouvelles technologies, téléchargez gratuitement les tout derniers logiciels et jeux
www.lestechmondes.com




Leave Your Comment