Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Take for instance:

cat /etc/passwd

Why doesn't this file have an extension such as *.txt*, *.dat*, etc? Or does an extension exist, but it's just being hidden?

Does this apply strictly to Unix-like systems?

share|improve this question
You should start accepting answers. – Ryan Clarke Oct 6 '11 at 13:08
up vote 12 down vote accepted

There is no extension. There's no reason for one. This isn't unique to Unix. You don't have to have a file extension in Unix or Windows. Windows won't know what to do with the file if you double-click it, but the program that made it probably does.

share|improve this answer

Most (if not all) legacy non Unix file systems were having a file name composed of (at least) two parts, the file name itself and its extension. For example FAT was using a fixed length structure (8.3) where the delimiter dot wasn't stored. This structure still exists with newer FAT schemes. Unix was (AFAIK) the first OS to introduce file names with no extension specific storage or requirement. While extensions are used under Unix in several cases, like source code, objects, libraries, manual pages, etc., most Unix utilities and applications do not care and use different heuristics to figure out a file type.

share|improve this answer
FAT "long filenames", as well as NTFS, do not have a separate extension, either. – grawity Sep 13 '11 at 7:37
Indeed, that's the reason why I wrote "were having a file name", not "have". Perhaps should I have written "had" by the way. NTFS was released long after Unix introduced "flat" file naming. On "modern" FAT, the underlying 8.3 structure is still present, long filenames are just an alias of the former. – jlliagre Sep 13 '11 at 12:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .