TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Who invented file extensions in file names?

243 点作者 azeemba超过 1 年前

15 条评论

xkcd-sucks超过 1 年前
Somewhat related, the question of &quot;what IS a file&#x27;s &#x27;type&#x27; really&quot; is pretty messy and AFAIK doesn&#x27;t have any satisfying solution or any satisfying single answer [0]. A satisfying solution might look like a (long) feature vector. Libmagic goes in the right direction at least although the binary-fingerprint-at-the-beginning approach doesn&#x27;t work well for everything &#x2F; past some level of detail<p>[0] where different use cases might be satisfied by e.g.<p><pre><code> &quot;a text file&quot; &quot;a file exclusively comprised of alphanumeric UTF16 characters&quot; &quot;a CSV file&quot; &quot;a file with tabular data and key-value metadata that calls itself CSV but is not spec-compliant so internally we&#x27;ll call it CSVprime&quot; &quot;A file with tabular data written as ASCII text that represents $this_kind_of_measurement&quot; ... etc </code></pre> If you have any resources on this topic off the top of your head I&#x27;d appreciate it if you shared them
评论 #38117457 未加载
评论 #38117872 未加载
评论 #38186838 未加载
评论 #38117697 未加载
cafard超过 1 年前
Back 40 years ago, Data General&#x27;s AOS&#x2F;VS defined 255 file types. In many cases, maybe all, there was a corresponding extension for the file, e.g. .exe for executables, .txt for text and so on.<p>However, there was a trick that I encountered: copies made not by a CLI command or a properly written utility, say by sending a file over email, did not preserve the type in the filesystem. Then you would try to compile or assemble the code somebody sent you, and get a baffling message about your file being of the wrong type. If you had encountered this before, you would<p><pre><code> REN xyz.asm xyz.xyz CREATE&#x2F;TYPE=ASM xyz.asm COPY&#x2F;APPEND xyz.asm xyz.xyz DEL&#x2F;V xyz.xyz </code></pre> and go on with your work.
评论 #38120114 未加载
daveslash超过 1 年前
I don&#x27;t know who specifically <i>invented</i> file extensions, but Raymond Chen&#x27;s <i>The Old New Thing</i> has some good insight into why they are important on Windows. Edit: In summary, it is to be able to support Tape based drives and avoid opening a file &quot;unless a user tells you to&quot;.<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=32811707">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=32811707</a>
评论 #38120260 未加载
rqtwteye超过 1 年前
It&#x27;s always amazing to think that somebody at some point had to invent things we now take for granted and feel like they just have to be that way.<p>As a sidenote it&#x27;s sad that WinFS failed.
评论 #38115106 未加载
avgcorrection超过 1 年前
Why is Java apparently one of the few languages that are brave enough to use four characters in its file extension? “Rust” becomes “rs”.
评论 #38114680 未加载
评论 #38120535 未加载
评论 #38115667 未加载
评论 #38118387 未加载
评论 #38114607 未加载
评论 #38114619 未加载
评论 #38114829 未加载
评论 #38119853 未加载
评论 #38115860 未加载
评论 #38116286 未加载
评论 #38123793 未加载
评论 #38120398 未加载
评论 #38114925 未加载
评论 #38115508 未加载
评论 #38119860 未加载
评论 #38114535 未加载
PaulHoule超过 1 年前
I remember them on the DEC PDP-8 (I was taking classes at the high school part time in the 4th grade, the high school had one that had those big 8 inch floppy drives) and RSTS&#x2F;E on PDP-11 early on (spent a lot of time with one at the high school in Milford one summer.) These were on CP&#x2F;M, a microcomputer OS that was big on high end microcomputers from 1975 to 1985 or so that was the inspiration for MS-DOS which also had them.
owlstuffing超过 1 年前
This is also sort of a flame war topic for some. Divided primarily by those who believe the file’s content should contain the type (or be sampled to infer it) and those who prefer that the file’s name contain the type. More or less.
评论 #38114622 未加载
评论 #38114818 未加载
评论 #38116385 未加载
评论 #38117625 未加载
评论 #38114885 未加载
评论 #38125363 未加载
评论 #38114552 未加载
wazoox超过 1 年前
ProDOS on the mighty Apple &#x2F;&#x2F;&#x2F; (and also the Apple ][) had a file type metadata back in 1983 :)<p>In fact even Apple DOS 3.1 (1978) supported 8 different file types.
评论 #38117302 未加载
pavlov超过 1 年前
JPEG files should have the extension .jpeg. Fight me.
评论 #38114977 未加载
评论 #38115001 未加载
评论 #38115394 未加载
nashashmi超过 1 年前
Makes for an intriguing concept in a tv show set in an alternate universe (Fringe?), where file extensions are not in the name but in the attributes of the file.<p>You would not need to hide file extensions then.
评论 #38116923 未加载
280877267超过 1 年前
file content contains the type can be read by computer.<p>file name contains the type can be read by human.
didgetmaster超过 1 年前
Using file extensions (or having to open the file and inspect contents) to determine file type is a slow way to find files. If you have one of the newest hard drives that is capable of storing 100M+ files on it (or a NAS made up of multiple, smaller drives); then it can take forever to find all files of a certain kind (e.g. photos, documents, etc.).<p>Just try to write a program that lists all your photos. You have to know all the various extensions that apply to still images (.jpg, .jpeg, .gif, .png, etc.) and do a string comparison against every file in the drive hierarchy. Might as well go to lunch waiting for it to finish if you have many millions of files to search.<p>This was the primary reason why I set out to build a better system that could scan through hundreds of millions of files and find all that matched a given subset in just a few seconds. <a href="https:&#x2F;&#x2F;www.Didgets.com" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.Didgets.com</a>
评论 #38116298 未加载
评论 #38116981 未加载
user3939382超过 1 年前
We usually can use file extensions to differentiate files that otherwise share the same name. I once worked on a VAX mainframe OS that to my surprise supported completely duplicate filenames including extension!
LargoLasskhyfv超过 1 年前
tl;dr MAD FAP
crazygringo超过 1 年前
Tangentially related: I find it weird that relating file extensions to GUI document icons still doesn&#x27;t work intuitively.<p>On my Mac, the document icons for file types still correspond to whatever program I&#x27;ve chosen to open that extension type by default.<p>Which is so strange -- an .mkv file isn&#x27;t a VLC document; an .mp4 file isn&#x27;t a QuickTime document, an .mp3 file isn&#x27;t an Apple Music document, a .jpg isn&#x27;t a Preview document, and a .tiff isn&#x27;t a Photoshop document. What the heck?<p>I wish the OS would just define reasonable, attractive, default document icons for every standard file type, that applications couldn&#x27;t control&#x2F;overwrite. Reserve application-defined document icons just for those apps who truly have their own proprietary file format (e.g. .psd or .docx).
评论 #38116766 未加载
评论 #38119424 未加载
评论 #38116365 未加载
评论 #38116628 未加载
评论 #38118906 未加载
评论 #38116392 未加载
评论 #38118263 未加载
评论 #38117388 未加载
评论 #38119632 未加载