Re: detecting file types



dagecko <dagecko@xxxxxxx> writes:

Le Wed, 08 Feb 2006 13:35:55 -0500, Chris F.A. Johnson a écrit :

On 2006-02-08, dagecko wrote:
Le Wed, 08 Feb 2006 12:24:03 -0500, Bill Marcum a écrit :

On Wed, 08 Feb 2006 18:05:57 +0100, dagecko
<dagecko@xxxxxxx> wrote:
Hi

I would like to know how to detect if a file is binary, if
it's an ascii or if it's a link to another file.
Unfortunately I don't know how to do that.

man file

LOL.

What's so funny? If you type "man file" at a command prompt, you
will be given the manual for the "file" command, which is what you
need to determine the type of a file.

I didn't knew man file, it was so easy for you to tell that,
that's why I made a lol, there was nothing against you, sorry
if I hurted you.

I read it quickly, but in fact this was not what I was looking
for. I needed a way to detect, in a program made in C/C++, if
a file is a binary one or a simple ascii one.

man libmagic

--
Måns Rullgård
mru@xxxxxxxxxxxxx
.



Relevant Pages

  • Re: detecting file types
    ... On 2006-02-08, dagecko wrote: ... it's an ascii or if it's a link to another file. ... If you type "man file" at a command prompt, ... Shell Scripting Recipes: | My code in this post, if any, ...
    (comp.os.linux.development.apps)
  • Re: How do I print an ASCII file?
    ... several nonalphabetic characters e.g. CR and LF, ... I'm also having trouble finding a fixed-width font in WordPad ... Is there no longer a command that will print an ASCII file ... from the command prompt? ...
    (microsoft.public.windowsxp.basics)
  • Re: detecting file types
    ... dagecko writes: ... it's an ascii or if it's a link to another file. ... If you type "man file" at a command prompt, ... scan the file looking for non-printing characters, ...
    (comp.os.linux.development.apps)
  • Re: How do I print an ASCII file?
    ... ASCII is the old DOS-standard alphanumeric code, ... Source code and fixed-format data files. ... from the command prompt? ...
    (microsoft.public.windowsxp.basics)
  • Re: detecting file types
    ... it's an ascii or if it's a link to another file. ... If you type "man file" at a command prompt, ... that's why I made a lol, there was nothing against you, sorry ... I needed a way to detect, in a program made in C/C++, if ...
    (comp.os.linux.development.apps)