Unix file extensions (Was: make apache2 serve file as htmL...)

John Macdonald john-Z7w/En0MP3xWk0Htik3J/w at public.gmane.org
Fri Jan 12 19:07:59 UTC 2007


On Fri, Jan 12, 2007 at 04:40:24PM +0000, Christopher Browne wrote:
> [...]  (Aside: People seem to keep forgetting that
> Unix has NO SUCH THING as a "file extension."  It's not MS-DOS.  It's
> not VMS.  It's not MVS.  All of those systems had special portions of
> filenames known as an "extension."  Unix doesn't do that.)

Unix, the operating system kernel, has no special meaning or
support for file extensions.  It does, however, permit users
to use any conventions they like to organize their files.  The
only rules enforced by the operating system about file names are:

- no slash in a file name (reserved for directory separator)
- no null in a file name (reserved for string terminator in system calls)
- "." and ".." are reserved for directory layout
- each type of file system has its own additional limitations, in particular
    the maximum length of a file name is a property of the particular file
    system type

On the other hand, Unix, the programming environment, has always
made use of file extensions to manage files.  The compiler,
linker, and make, for example, all use extensions in a
consistant way to specify types of files used for programming.
The ls program uses file names that begin with . (i.e. contain
only an extension) to denote files that are, by default,
not listed.

So, the original point is true, but only to a point.
The concept "you have no NEED to use extensions in Unix"
is useful for people to know.  However, any phrasing of that
concept that implies "you should not use extensions in Unix"
is just plain wrong.  So, be careful about how urgently you
present that message.

-- 
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list