Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie confused about file extensions? 4

Status
Not open for further replies.

spook007

Programmer
May 22, 2002
259
0
0
US
I'm trying to understand linux's file extensions. I've downloaded files that come with a .tar.gz extension after a lengthy file name. My understanding is that they are compression extensions like .zip

What about the .rpm and .bin what are they? Hope someone can clear this up for me. Thanks!! :)
 
You are correct on the .tar.gz files. You can use tar -xvzf <filename> to unpack them. .rpm files are redhat package management files. They are install packages. bin files are usually binary files. Linux does not have extentions like windows (yet) you can use anything you want (or nothing at all) but if you follow convention it will make it easier to keep track of things.
 
.tar.gz is actually two extensions.

.tar is an archive of files. You can think of it as a way of treating a set of files as a single entity.

.gz is the compression part; .gz means compressed with gzip. (Other common extensions indicating other types of compression are .bz2, .Z, and .zip).

So a .tar.gz is a tar file that has been compressed with gzip. You might also see something like .html.gz (compressed HTML file) or .ps.gz (compressed PostScript file).


.tar.gz files are commonly used for distributing the source code and documentation for an application or library. You can compile this source code to obtain a program which you can then install. That lengthy name is often the name and version of the software it contains.


A .rpm is, as mentioned above, a Red Hat Package Manager package. It contains already-built programs or libraries, so it does not need to be compiled before it is installed. This means the install will be faster, but you have less chance to customize the program to your particular needs; you just get what Red Hat decided you should get (which is often right).

Red Hat's package manager also keeps track of the files installed on your system, making it easier to uninstall software from a .rpm than it would be to uninstall software compiled from source and installed "manually."


A .bin file is normally a script that, when executed, unpacks itself and goes through a process for installing some kind of software. It may or may not compile source code; it may or may not keep track of where it installed files so you can remove them later.
 
ChipperMDW;

Thanks for the explanation, it certainly put things in perspective. Are there programs that have to be associated with certain extensions. I understand that gzip is used for the .gz and tar is used for .tar, but how about the .rpm and .bin

I downloaded coldfusion-61.lin.bin from macromedia's site and have no idea how to install it.

Why is it that on some files when installing you type a ./ before the file name. For example ./configure if I type configure alone it doens't know what I'm talking about. Thanks!
 
.bin is a binary file. For an installer, you typically just run it. You might have to "chmod +x file.bin" to make it executable. I think you could also run "sh file.bin", but I don't know if that's universally true.

.rpm is an rpm file as mentioned above. The program for that is "rpm". Try "man rpm" or "rpm --help" for further info.

For security, to help prevent the accidental execution of programs, the current directory is not in the path. So, if you want to run a program in the current directory you need to specify the path. If you just type the name, Linux will look for the program in the path.
 
In windows (don't mean to swear in this forum!) there are folders like program files where the majority of your files get installed, is there something like that in Linux. I get confused with the /usr/local/bin and /sbin the names don't mean much to me, just wondering if there was something to it. Thanks.
 
/bin, /usr/local/bin and /usr/bin typically contain programs that are available to all. I really don't know the significance of the different ones.

The "sbin" directories have system files. Anyone can execute them, but often they're only in root's path, and at least some require root privileges to run.

I'm sure not an expert on this, but that's my understanding.
 
Franklin97355;

Exactly what I was looking for. Thanks much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top