El vie, 30-01-2004 a las 11:41, Ryan Boder escribió: > On Fri, Jan 30, 2004 at 09:34:52AM +0100, Heinrich Rebehn wrote: > > You should not forget users that are working on the command line or use > > some tool like midnight commander (like i do). Using extensions to > > denote the filetype allows me to view immediately what stuff i have in > > my directory. > > I don't see any reason why the shells can't use meta data just like a GUI > file manager would. Then the ls command could show the file type as well as > the file name when given some option to ls. Good point! Not only that, but the GNU file utils (can't recall) are in the process of supporting EAs or already do. I'd like to do a ls -mla and get a listing of my files with mime types for example. That way I'd have way more control. Imagine this: ls -ml | grep 'audio\/' > playlist.m3u && xmms -e playlist.m3u See? I could think of more inventive things: find -print0 /home/Music -mimetype 'audio/*' | cdrecord -dev 0,0,0 (quick backup of my music files) > > I use bash more often then I use nautilus and I think it would be useful if > both shells did file sniffing. Me too. > > Also, it's still the fastest way. Once you have read the directory, you > > know the mime-types of all files within it. > > If the user decides to use "wrong" extensions, it's his decision, and if > > the image viewer displays garbage because "pic.jpg" contains ascii, he > > can use the file command to check what's wrong. To whoever wrote this (not Ryan): Please try to understand file types aren't extensions. You definitely aren't seeing the bigger picture. You're mixing file type and extension. Those two concepts aren't interchangeable, the one is a representation of the other and period. And it's a bad representation. Sure, a single readdir() is much faster than inspecting the MIME types of each file using EAs, but that could change in the future, when the filesystem layers get enriched with new APIs. Plus, this thing is not just about speed, it's about bringing new functionality. I'm sure you'll be able to choose to keep a crippled system, though. It's not a point of the user using the "wrong extension" most definitely. It's the point of the user NOT HAVING to use extensions, but having the system work RIGHT, for once, without extensions. Google for "mac, metadata and you". Read the first link. Now, back to Ryan =) > > Using file sniffing and meta data to store mime types would not stop you > from putting file extensions in your file names. Yes, you can put ten extensions if you like. The point of this is to stop RELYING on the extensions or content sniffing. This is a good thing =) > It would just make someone > like me who hates file extensions not be forced to use them. So it's less > restrictive than the current way we do it. Also when you are wrong about the > file type, file sniffing would probably get it right. > > -- > Ryan Boder > http://www.bitwiser.org/icanoop -- Manuel Amador (Rudd-O) GPG key ID: 0xC1033CAD at keyserver.net
Attachment:
signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente