LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-22-2003, 07:26 PM   #1
troycus
Member
 
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
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
* http://www.linuxheadquarters.com/howto/basic/gz.shtml
* man gunzip
 
Old 09-22-2003, 08:32 PM   #3
win32sux
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


http://www.die.net/doc/linux/man/man1/gzip.1.html

http://www.die.net/doc/linux/man/man1/tar.1.html

http://www.redhat-linux.com.my/faq/common15.html
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:43 PM.

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