Page 1 of 1

There's something about File Extensions

Posted: Thu Mar 10, 2005 4:26 pm
by Ambush Commander
Is it just me, or is there like this unspoken rule in Linux that says thou shalt not use file extensions? Just wondering. A lot of txt files don't have file extensions. It's been baffling me ever since I installed Mandrake Linux on a laptop.

Posted: Thu Mar 10, 2005 7:26 pm
by timvw
in unix there no such thing as extensions.. there are only filenames.

Posted: Thu Mar 10, 2005 7:29 pm
by Ambush Commander
Then how do you tell what a file is?

Posted: Thu Mar 10, 2005 7:33 pm
by feyd
Windows nor Macs require an extension either. They are mostly there for convienance. The file's data itself determines what the file is.

Posted: Thu Mar 10, 2005 7:34 pm
by Ambush Commander
Oh... that's interesting. So if you get a mystery file, what do you do with it?

Posted: Thu Mar 10, 2005 7:39 pm
by timvw
i was thinking about the dos days.... filename (8) + extension (3)

anyway, "man file" will give you some clear hints on how to discover the "type" of a file....

Posted: Thu Mar 10, 2005 7:41 pm
by Ambush Commander
Awesome. Thanks. Is it a good idea to add file extensions?

Posted: Thu Mar 10, 2005 7:43 pm
by feyd
extensions help Windows determine which application to launch by default. They help most applications find the files they normally deal with.. other than that, it doesn't matter too much.

Posted: Fri Mar 25, 2005 1:09 pm
by Pyrite
There is no problem using file extensions in Linux. It's up to you. If you use a shell like Bash with colors enabled, when you do an ls in a directory, binaries (executables) will show up green, symlinks aqua, directories blue etc etc. Some people choose to name binaries with a .bin, and you can use anything you want really. In Linux though, it is easy to tell by the directory you are in, for instance, you can bet everything in /usr/bin is a binary, or everything in /etc is a text file / script. In your home directory, it is up to you.