On Tue, May 25, 2004 at 09:47:16AM -0400, Gregory Seidman wrote: > On Tue, May 25, 2004 at 08:33:19AM +0200, Magnus Therning wrote: > } A quick search in Google didn't reveal any solution (only found one > } reference, in Japanese). > } > } $ file -i file.sxw > } file.sxw: application/x-zip > } > } It would be really nice if 'file' could give proper the correct type for > } OpenOffice documents. Anyone who has an entry for /etc/magic that make > } sit happen? > > This is a deeper problem than just OOorg. There has been dissatisfaction > with file's reporting for compressed/gzipped/bzipped/zipped files for a > good long time, and the idea of having file actually decompress some of > the data to get a more accurate result has come up in the past. > > There are, in fact, reasonably good ways to wrap file with a shell > script to get the desired results, but I don't know of an implementation > of the file program that supports examining the contents of a compressed > file. There is no reason it couldn't be done, of course; the file > program in /usr/bin on Debian is GNU's GPL'd file implementation. I > could imagine, however, that depending on lots of compression libraries > might be an obstacle to widespread adoption. One would also have to be > confident of the libraries' licenses. (I *think* all the compression > formats I've mentioned have GPL or LGPL libraries.) > > Ultimately, I'd love to see it done, and I encourage you to get > programming. > > } /M > --Greg
What's kind of ironic is that the first line of the files states the MIME type in ASCII. [EMAIL PROTECTED]:~/docs$ strings test.sxw | head -n1 mimetypeapplication/vnd.sun.xml.writerPK [EMAIL PROTECTED]:~/docs$ strings test.sxc | head -n1 mimetypeapplication/vnd.sun.xml.calcPK Keith -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]