![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| <drive type unknown> when format command run | prvnrk | SUN Solaris | 1 | 09-08-2007 07:56 AM |
| Command that prints content of line5, or similar? | lunchtime | Linux | 4 | 07-09-2007 05:58 AM |
| Type of content: VENDOR WHITE PAPER - Forbes | iBot | UNIX and Linux RSS News | 0 | 07-04-2007 01:00 AM |
| Command to determine Tape Type | Surdeymon | AIX | 4 | 06-10-2005 10:19 AM |
| Content-Type | primal | UNIX for Dummies Questions & Answers | 1 | 12-20-2001 09:36 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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 09:53 AM. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
Quote:
Please search the Web for more information about this, in particular look for the keywords I used in the previous post. |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|