Click to See Complete Forum and Search --> : filename extensions...


euroslash
11-04-2001, 04:53 PM
just wondering if there are any tables, or anything where it compares .exe etc to the linux equivelant? like for quite a few file extensions, etc.

thanks.

€/

Ig0r
11-04-2001, 05:10 PM
File extentions in unix-like environments are just helpful hints as to the file type. Most file-type-checking is done using "magic numbers" in the file (which you can do yourself using the 'file' command).
Most compiled code will not have an extention at all, but will have the executable bit set in it's file permissions. Other types of executables are interpreted-language scripts which are fairly common because they are easy to edit and function reasonably quickly to chain other programs and libraries together. Shell scripts usually have the extention .sh, PERL .pl, Python .py, etc...
The file program will usually tell you what type of file it's looking at.

GrassMunk
11-04-2001, 07:42 PM
you could rename the file <file>.exe but theres really no point. To launch an executible just do ./<file>

X_console
11-04-2001, 07:46 PM
As it's been said, extensions in Linux don't really matter (although they do in a few cases) except for letting you know right away what kind of file it is. An executable could be anything, a script or a compiled program, and can even have any extension, including .txt or .zip. To Linux, it's just a name, and the actual contents of the file and whether or not the x bit on it's permissions is set is what determines if a file is executable.