LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help using gunzip. (https://www.linuxquestions.org/questions/linux-newbie-8/help-using-gunzip-95658/)

troycus 09-22-2003 07:26 PM

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.:confused:

synaptical 09-22-2003 07:33 PM

* http://www.linuxheadquarters.com/howto/basic/gz.shtml
* man gunzip

win32sux 09-22-2003 08:32 PM

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


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