The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
<drive type unknown> when format command run prvnrk SUN Solaris 1 09-08-2007 11:56 AM
Command that prints content of line5, or similar? lunchtime Linux 4 07-09-2007 09:58 AM
Type of content: VENDOR WHITE PAPER - Forbes iBot UNIX and Linux RSS News 0 07-04-2007 05:00 AM
Command to determine Tape Type Surdeymon AIX 4 06-10-2005 02:19 PM
Content-Type primal UNIX for Dummies Questions & Answers 1 12-21-2001 12:36 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-19-2005
aqh2 aqh2 is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 2
Can i change content type?

Hi
I run on a Unix webserver at my university. I have a couple of *.inc files which are include files used for php.

They are all in one folder without an index file. If you go to the folder, you get to see a list of files in that dir.

Some of the .inc have a question mark icon next to it. others have a text icon next to it. I do not know why? They are the same extensions.

All have html tags inside. If you go to each one in a web browser, some files will display as html by the browser. others will display it as text.

Is there a reason behind this due to content type? if so, how do i change it?
Also, i connect using telnet or SSH. if i run ls, some files have an asterisk next to the name. Why is that?

Last edited by aqh2; 11-19-2005 at 12:53 PM..
  #2 (permalink)  
Old 11-19-2005
cbkihong cbkihong is offline Forum Advisor  
Advisor
  
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,624
Your school's Apache probably have mod_mime_magic enabled.

Apache's usual way to determine the icon used on an directory index is by the MIME type of the file (a few others by name). In turn, MIME type are defined by extension (either from AddType directives or mime.types as system default). So the way the icon is determined should be relatively "consistent".

If mime-magic is enabled, it will try to scan the first few bytes of the file in question, in the same way you do it with a file(1) command to determine the type. It matches according to a set of preset signature in a magic file. So, extension is not important if this extension is enabled, so multiple files with same extension may come up with different icons, depending on what is contained in the first few bytes of the file.
  #3 (permalink)  
Old 11-19-2005
aqh2 aqh2 is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 2
Thanks for the answer,
Now i need to know if there is a unix command that i can run that could manually change the mime-type of the file.

The other question is why is there an asterisk next to the filename.
  #4 (permalink)  
Old 11-19-2005
cbkihong cbkihong is offline Forum Advisor  
Advisor
  
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,624
Quote:
Originally Posted by aqh2
Thanks for the answer,
Now i need to know if there is a unix command that i can run that could manually change the mime-type of the file.
You just change the configuration files in Apache to affect Apache. I see no reason to change the system magic file signature as the two are separate.

Please search the Web for more information about this, in particular look for the keywords I used in the previous post.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0