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