Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine MIME type

Status
Not open for further replies.

spookie

Programmer
Joined
May 30, 2001
Messages
655
Location
IN
Hi,

How do i determine MIME type of .doc,.pdf,.xsl etc files on UNIX machine.
It should not determine from extension as some extensions are wrong. E.g. doc fle having .rtf extension etc.

I have tried file::type but its giving me 'octet stream' for all types.

Thanks

--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
The script will read dir and for each file it will determine its MIME type.
How to go abt this?
This is kinda urgent

--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Can UNIX file command can be used here?
I am trying it but i am not sure how to use it.
OS: Sun Solaris 5.9

--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
ask unix questions in the unix forum. ;)
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top