<p>Thanks Steve for clearing this confusion.<br></p>
<p>Zeeshan A Zakaria</p>
<p>--<br>
<a href="http://www.ilovetovoip.com">www.ilovetovoip.com</a></p>
<p><blockquote type="cite">On 2010-08-25 3:16 PM, &quot;Steve Edwards&quot; &lt;<a href="http://asterisk.org">asterisk.org</a>@<a href="http://sedwards.com">sedwards.com</a>&gt; wrote:<br><br><p><font color="#500050">On Wed, 25 Aug 2010, Zeeshan Zakaria wrote:<br>
<br>&gt; Apparently all Linux files have a mime type informati...</font></p>Linux files are just a byte stream. They do not have &quot;mime type<br>
information stored in them.&quot;<br>
<br>
&quot;file&quot; works by examining the first x bytes of the file and comparing this<br>
to a &quot;magic&quot; file of &quot;rules&quot; to guess file types.<br>
<br>
For instance, a JPEG file starts with &quot;0xff 0xd8 0xff 0xe1.&quot;<br>
<br>
The &quot;-i&quot; or &quot;--mime&quot; command line option causes file to display a &quot;mime<br>
type&quot; instead of a &quot;more traditional human readable&quot; one.<br>
<br>
The &quot;hexdump&quot; command will show you the &quot;binary&quot; contents of a file in a<br>
variety for formats:<br>
<br>
# Create a file with 2 lines<br>
$ printf &quot;line 1\nline 2\n&quot; &gt;foo<br>
<br>
# Dump the file. Note that &quot;0a&quot; (newline, aka line-feed) is the line<br>
# ending character.<br>
$ hexdump -C foo<br>
00000000  6c 69 6e 65 20 31 0a 6c  69 6e 65 20 32 0a        |line 1.line 2.|<br>
<br>
# file says it is just ASCII text, like all text files on Unix should be.<br>
$ file foo<br>
foo: ASCII text<br>
<br>
# Convert the file to DOS line endings<br>
$ unix2dos foo<br>
unix2dos: converting file foo to DOS format ...<br>
<br>
# Dump the file. Note that the line ending characters are now &quot;0d&quot;<br>
# (carriage return) and &quot;0a&quot; (newline).<br>
$ hexdump -C foo<br>
00000000  6c 69 6e 65 20 31 0d 0a  6c 69 6e 65 20 32 0d 0a  |line 1..line 2..|<br>
<br>
# file says it has &quot;funky&quot; line endings.<br>
$ file foo<br>
foo: ASCII text, with CRLF line terminators<br>
<br>
CRLF = Carriage Return, Line Feed -- think of a typewriter. Watch the<br>
History Channel for more info.<br>
<br>
--<br>
Thanks in advance,<br>
-------------------------------------------------------------------------<br>
Steve Edwards       <a href="mailto:sedwards@sedwards.com">sedwards@sedwards.com</a>      Voice: +1-760-468-3867 PST<br>
Newline                                              Fax: +1-760-731-3000<br>
<font color="#888888"><br>
--<br>
</font><p><font color="#500050">_____________________________________________________________________<br>-- Bandwidth and Colocation Pr...</font></p></blockquote></p>