Others > Miscellaneous

Diffrence between rpm, src.rpm, tar.gz, .Z, tgz, tar.bz2

(1/3) > >>

vlinux1:
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

dragoncity99:
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: ---# rpm -ivh my-application.rpm

--- End code ---

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: ---# rpm -ivh my-application.src.rpm

--- End code ---


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: ---# tar czvf MyDirectory.tar.gz MyDirectory

--- End code ---

To extract files:

--- Code: ---# tar xzvf MyDirectory.tar.gz

--- End code ---

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: ---# tar cjvf MyDirectory.tar.bz2 MyDirectory

--- End code ---

To extract files:

--- Code: ---# tar xjvf MyDirectory.tar.bz2

--- End code ---

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: ---# installpkg my-slackware-tarball.tgz

--- End code ---
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: ---# compress myfile
(And u will get a file called myfile.Z)

--- End code ---

To uncompress using this Liempel algorithm:

--- Code: ---# uncompress myfile.Z

--- End code ---

Ricky:
Good post Dragoncity99 :)
I am making it sticky so that it appears above all posts always.

dragoncity99:
A million thanks to u, Ricky. :)

Ujjwol:
i cannot express how i can thank you

Navigation

[0] Message Index

[#] Next page

Go to full version