Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-22-2003, 07:26 PM   #1
Registered: Sep 2003
Posts: 84

Rep: Reputation: 15
Help using gunzip.

I downloaded some software for linux that require the use of gunzip. I could really use some help getting an understanding on how it work.
Old 09-22-2003, 07:33 PM   #2
Senior Member
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
* man gunzip
Old 09-22-2003, 08:32 PM   #3
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
gzip will compress or decompress your file...

it's basically very simple...

to compress file "example.rpm" we would use something like this:

gzip example.rpm

this will compress and rename the file to "example.rpm.gz", it puts the "gz" at the end while maintaing the "rpm" in front of it so we can know it's an rpm that's been "gzipped"...

to decompress our file "example.rpm.gz":

gzip -d example.rpm.gz

which would leave us with the original "example.rpm"

of course this is the basics... read the man pages if you want to know more... and also you might want to read about "tar", cuz when you mix tar with gzip you get an explosive combination. it's like they're meant for each other... really. most software source code for linux will come as a gzipped tar file... better known as a "tarball"... it's important that you know what tarballs are and how to deal with them.

what tar does is take a bunch of files and/or directories and make them into a single file. this file can be "un-tared" and you will get all the original files and directories. you get lots of benefits, namely the ability to compress that tar file and save lots of space and time and bandwidth and making things easier (only one md5, for example)...

this would make a tar file of directory "windows" (in the directory you currently are in):

tar cf windows.tar windows

this would untar the "windows.tar" file you created above:

tar xf windows.tar

since the tar file was of directory "windows", it will create directory "windows" wherever you untar it...

you could then take that tar file you made of your windows directory and apply gzip to it:

gzip windows.tar

which would leave you with "windows.tar.gz", your tarball...

the cool thing is tar has access to gzip built in:

tar czf windows.tar.gz windows

that would tar and gzip your windows directory in one shot.

this would do the opposite (untar/decompress) in one shot:

tar xzf windows.tar.gz


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gunzip Problem anandham Red Hat 2 08-11-2005 05:13 AM
Gunzip Problem anandham Linux - Newbie 1 08-09-2005 07:07 AM
gunzip-how to use. OldSarge Linux - Software 11 08-28-2003 04:10 PM
gunzip sentme_mail Solaris / OpenSolaris 23 01-20-2003 10:09 AM
gunzip command ronss Linux - Newbie 3 03-21-2002 12:04 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration