Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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
1  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.