4 ms·
On a related tangent, can we please have an operating system that eschews extensions and instead stores the MIME type for each file?
by porges 14y ago
On a related tangent, can we please have an operating system that eschews extensions and instead stores the MIME type for each file?
- rdl 14y agoThe crazy mac resource fork thing isn't exactly better.
- kalleboo 14y agoMac OS X? http://en.wikipedia.org/wiki/Uniform_Type_Identifier http://en.wikipedia.org/wiki/Uniform_Type_Identifier
- wmf 14y agoBeOS did that. I think it's a shame that OS X seems to be moving backwards in this respect.
- astrodust 14y agoFiles used to be tied to applications directly. While I prefer the BeOS approach of MIME-type, it's not nearly as user-friendly as a file extension. OS X tries to hide extensions by default, which like the behavior in Windows that's similar, seems dangerous. Too many times people have been stung by sexy.jpg.exe.
- jamesbritt 14y agoUgh. I have that in the konqueror file browser. It beleives that my .epub files are zip archives, so the default handler is not an epub reader.
- dredmorbius 14y agoWhat's file(1) say about those files? If it's bad magic, update your distro. If it's a Konqueror error, file a bug. I'd be surprised if upstream hasn't addressed this (quick DDG/Google doesn't turn up any similar complaints).
- jamesbritt 14y agoBut they are zip files. (Though `file somebook.epub tells me "data". Sigh. Desktop and OS seem to be on different pages.) Just like .css and .log are text files, but I may not want the same default file handler. What I like is having *.epub open in, say, calibre, but if I append a .zip extension then it will open in xarchive. Anyways, I open most things from the command line and wrote my version of 'open' so I get what i expect 99% of the time. :) I'm using KDE3 so I'm not expecting any upstream fixes for this in my lifetime. I can live with crafting my own solutions. What might work best is if mime types were used by default but forcing behavior for specific extensions was much easier. Get the best of both worlds (which I can mostly do in KDE3 Konqueror but it's tedious.)
- dredmorbius 14y agoFile(1) on my Debian wheezy says they're epubs. File has dealt with nested formats for decades. It examines up to the first 1024 bytes of the file IIRC. Other examples: tar.gz, WAR files, most ODF formats. Edit: smartphone tyops fixed.
- dredmorbius 14y ago... and file(1) under my Ubuntu 11.10 system calls 'em zips. Debian added upstream epub support (and backed out its own) in September, 2011, so this is a pretty recent feature.
- dredmorbius 14y agoDo you mean default file magic: http://en.wikipedia.org/wiki/Magic_number_(programming) http://en.wikipedia.org/wiki/Magic_number_(programming) Or do you mean storing a database of the application associated, specifically, with any given file (so that I might open, say, a given myprog.c with vi, emacs, or textmate)? The Mac OS resource fork model attempts the second, but it's an inherently single-user concept that leaves artifacts around for other users and/or on shared media in an annoying way. A shadow filesystem maintained on a per-user basis under their control would be a preferred solution.