November 22, 2024, 05:28:52 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2  (Read 27488 times)

Offline vlinux1

  • Linux Learner
  • ***
  • Posts: 118
Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« 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

Offline dragoncity99

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 551
Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« Reply #1 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
« Last Edit: January 05, 2012, 02:51:23 AM by dragoncity99 »

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« Reply #2 on: December 17, 2005, 10:24:27 AM »
Good post Dragoncity99 :)
I am making it sticky so that it appears above all posts always.

Offline dragoncity99

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 551
Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« Reply #3 on: December 17, 2005, 05:29:39 PM »
A million thanks to u, Ricky. :)

Offline Ujjwol

  • Linux Learner
  • ***
  • Posts: 54
Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« Reply #4 on: May 20, 2007, 06:32:25 AM »
i cannot express how i can thank you

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« Reply #5 on: May 30, 2007, 12:47:48 PM »
Excellent explained Dragoncity

Great job  :)

Offline akashyak

  • Tux Awared
  • **
  • Posts: 44
Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« Reply #6 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 ?

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« Reply #7 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

Offline aktiwari4u

  • LST CareTaker
  • Crescent
  • *****
  • Posts: 161
    • http://aktiwari4u.tk/
Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« Reply #8 on: April 26, 2008, 07:56:42 AM »
This is really a good addon to this best explained topic. thanks to both of you .

Offline Cool_G5

  • New Member
  • Posts: 3
    • Layman Linux - Learning Linux the Layman's Way
Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« Reply #9 on: July 01, 2009, 08:45:43 AM »
Very nice explanation. Good to see it stucked.

Offline gazalovespells

  • New Member
  • Posts: 3
Re: Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2
« Reply #10 on: November 27, 2012, 09:57:23 AM »
thanks a great explanation



www.lovespells.me