Hi friends,
I am back...My xams are finally over....
Everyone says, Linux gives u source code.......What do u eactly mean by source code.....
One thing is for sure.......they are not machine readabe files..........so are they *.c or *.cpp files
If you're mentioning linux kernel source, yes, most of them are .c and .h files.
Whatever language the apps are programmed in, it's code is given. Like for FC you have srpms they are nothing but source rpm's.
Yes. Source code is written in C language. Advantages of providing source code:
1) Customize the entire application: I take the source code, add some more features written by me or remove features that are not necessary.
2) Build the application for your linux architecture. For instance, application xyz.rpm is not compatible with Redhat Linux 9. What I will do is I will take the source code of the application xyz, compile it, build RPM and install the rpm on my RHL 9 machine.
Well but if the application is written in a different language then it's source will be given in that language.
yes. If the application is written in any other language, it is necessary that the compiler for that language is installed.
Why are source code provided in tar files?
Is it jst fr compression or there is any other reason too?
^^
Compression, free compression mostly.
tar isn't a compression it's for archiving. gzip and bunzip2 are the commonly used for compression. The source code we are talking about here is what you normally get in a .tar.gz or .tar.bz2 file. gz or bz2 are used to reduce the download size and tar is used cos there are a lot of files so archiving them is a good idea. This is what I understand. I maybe wrong in one or two points.
The code you see in these archives is in whatever language the application was written in.
@mehul. You're right. tar is an archiving utility. gzip or bzip is compression utility. What ppl will usually does is they tar (archive) all the files, the gzip or bzip (compress) the archive. So the usual extension for an compressed archive will be .tar.gz or .tar.bz2.
PS: In terms of compression ratio bzip is much better than gzip.