Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Others => Miscellaneous => Topic started by: vlinux1 on December 13, 2005, 12:36:12 PM

Title: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: vlinux1 on December 13, 2005, 12:36:12 PM
Dear All,

please tell me the diffrence between Rpm,Srcrpm&tar.gz package.

Which is the best package & why? (I am confuse )

Thanks in advance
Title: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: dragoncity99 on December 14, 2005, 02:45:55 PM
Dont confuse urself. I will do it in short and simple words.

1. RPM
RedHat Package Manager files are readily compiled binaries. U can just install it by initiating:
Code: [Select]
# rpm -ivh my-application.rpm

2. src.rpm
Source RPM. This is the package contains only the source code for the an application.

When u install this binary, all the source code will be extracted to ur linux system. No binaries/executable files for u to run an application.

To run an installation on src.rpm files:
Code: [Select]
# rpm -ivh my-application.src.rpm


3. tar.gz
The content in this package can be either a binary/a source code okay. Dont' relate it with RPM. U will only get confused.

IMPORTANT: .tar.gz is a way used to compress files/directories into one small file.

Let's say i have a "Directory" call "MyDirectory" and it it contains all my files and programs. If i wan to compress it into one file i do this:

Code: [Select]
# tar czvf MyDirectory.tar.gz MyDirectory

To extract files:
Code: [Select]
# tar xzvf MyDirectory.tar.gz

4. tar.bz2
Same explaination as in [3], the difference is that, when u see tar.gz (it's using gzip compression to compress files).

Let's say i have a "Directory" call "MyDirectory" and it it contains all my files and programs. If i wan to compress it into one file i do this:

Code: [Select]
# tar cjvf MyDirectory.tar.bz2 MyDirectory

To extract files:
Code: [Select]
# tar xjvf MyDirectory.tar.bz2

And when u see tar.bz2, (it's using bzip2 compression to compress files)

5. tgz
This is very confusing indeed. I divide this into 2 category:
========
Category #1
========
Slackware use tarballs, with .tgz extension for their compiled binaries that is readily to be installed.
For example:
Code: [Select]
# installpkg my-slackware-tarball.tgz
Don't worry bout this, if they tell u it's a Slackware tarball. Then it is.

========
Category #2
========
Sometimes developers for some applications use .tgz file extension to represent .tar.gz extensions.

Just remember:
If websites that gives u a tgz file and never mention it's a Slackware tarball/package.

IT IS A NORMAL TARRED GZIPPED ARCHIVE
tgz = tar.gz



6. .Z
Some ppl call it a Liempel Z... i don remember the compression name used. But this is another type of archive:
To compress using this Liempel algorithm:
Code: [Select]
# compress myfile
(And u will get a file called myfile.Z)

To uncompress using this Liempel algorithm:
Code: [Select]
# uncompress myfile.Z
Title: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: Ricky on December 17, 2005, 10:24:27 AM
Good post Dragoncity99 :)
I am making it sticky so that it appears above all posts always.
Title: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: dragoncity99 on December 17, 2005, 05:29:39 PM
A million thanks to u, Ricky. :)
Title: Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: Ujjwol on May 20, 2007, 06:32:25 AM
i cannot express how i can thank you
Title: Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: gauravbajaj on May 30, 2007, 12:47:48 PM
Excellent explained Dragoncity

Great job  :)
Title: Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: akashyak on August 01, 2007, 02:22:14 AM
What about .deb file ? I have downloaded Yahoo messenger file, and it is like this:

ymessenger_1.0.4_1_i386.deb

Now can you instruct me regarding this ?
Title: Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: Ricky on August 01, 2007, 09:54:48 AM
.deb is for debian and debian based linux distrobutions.
If you have Debian, ubuntu or some distro based on debian then you can use this ie. *.deb files .
Its easy to install.
Code: [Select]
dpkg -i <filename>.deb
To remove .deb file
Code: [Select]
dpkg -remove <filename>.deb
Title: Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: aktiwari4u on April 26, 2008, 07:56:42 AM
This is really a good addon to this best explained topic. thanks to both of you .
Title: Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: Cool_G5 on July 01, 2009, 08:45:43 AM
Very nice explanation. Good to see it stucked.
Title: Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
Post by: gazalovespells on November 27, 2012, 09:57:23 AM
thanks a great explanation



www.lovespells.me (http://www.lovespells.me)