Does Haiku have an equivalent to the file command? I am writing a script that needs to find out if the file I'm dealing with is plain text. In OSX (and Linux, I believe), I can do that with
If you're not sure if the file in quesion has a MIME type assigned at that point, try a mimeset filename
Though sometimes that sniffs out the filetype wrong. I just tried with a textfile containing a backtrace from a crash, and Haiku insists it's a video/mp2t...
Thanks, everybody. Requiring my user to install file from Haikuports is not an option, unfortunately. I'll see how far I can get with the suggestions you've made.
Comments
Re: FILE Command
Try this:
catattr -d BEOS:TYPE filename
Re: FILE Command
If you're not sure if the file in quesion has a MIME type assigned at that point, try a
mimeset filenameThough sometimes that sniffs out the filetype wrong. I just tried with a textfile containing a backtrace from a crash, and Haiku insists it's a video/mp2t...
Regards,
Humdinger
Re: FILE Command
http://ports-space.haiku-files.org/sys-apps/file-5.04-x86-gcc2-2010-05-1...
Extract it to /boot either with a GUI or using "unzip -d /boot file-5.04-x86-gcc2-2010-05-17.zip"
Re: FILE Command
Thanks, everybody. Requiring my user to install file from Haikuports is not an option, unfortunately. I'll see how far I can get with the suggestions you've made.