Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Distribution: Red Hat (8.0, RHEL5,6), CentOS, SuSE (10.x, 11.x, 12.2, 13.2), Solaris (8-10), Tru64, MacOS, Raspian
Re: Linux file extension vs Dos file Extension?
Originally posted by manaa please compare or describe linux file extension with DOS /Window file extensions.
Well, for one thing, DOS actually interprets the file extension and loads the program in a certain way (depending on the extension) to run it. Windows uses the file extension to tell it which application to run to process the file (Word to handle .DOC files, etc.).
UNIX/Linux doesn't use file extensions to figure out how the program should be run. Now some Unix/Linux applications will use a file extension to figure out what to do with a particular file. The best example is Netscape/Mozilla/etc. These browsers use the file extension to launch the correct helper application when you click on a file. I expect that the Nautilus file manager does something similar to tell it how to display an image or how to play an audio file when you leave the mouse on it.
But for things like scripts or compiled programs the use of an extension is mostly to help us humans know what the file is. The perl script `myperl' and `myperl.pl' are two entirely different files. I could write a perl script and name it `myperl.exe' and perl wouldn't care (though I'd have to run it as `myperl.exe' and not just `myperl'. Bottom line is that file extensions are -- for the most part -- optional. You can use them to help you remember what the file contains or you can leave 'em off and use the `file' command to figure out what's inside.
unlike windows if you rename hello.doc to hello.mp3, windows will think it is an mpeg layer 3 audio file.
whereas in linux if you rename hello.doc to hello.mp3, it will continue to know it is an open-office document.
The unix tradition is that what you call the filename extension doesn't have a particular meaning. the dot is just one of the chars that you can use for a filenname, so, for example
would be a valid, but unusual, filename, where the dos/windows tradition wouldn't like that.
given that the Unix tracition gives no special significance to a three char file type and the dot as a separator, it is unsurprising that the OS doesn't do anything in particular with those three chars. Although, a layer on top of the OS (apps, the GUI if you have one) could use three chars for something special, although you could argue that this is against tradition (for what that's worth).