[lug] help
rm at fabula.de
rm at fabula.de
Thu Jul 29 10:58:26 MDT 2004
On Thu, Jul 29, 2004 at 10:36:11AM -0600, David Morris wrote:
> On Thu, Jul 29, 2004 at 02:03:15PM +0200, rm at fabula.de wrote:
> > On Thu, Jul 29, 2004 at 05:04:30PM +0530, vinatha.komirishetty at wipro.com wrote:
> > > I would like to find the type of file (ie) whether it' s an
> > > UTF-8/Ascii/Ebcidic File..could u plz do enough help to solve this
> > > issue.
>
> As already noted it is VERY difficult to answer the question
> with so little information.
>
> One program that might help though is `file`, which is
> standard on most Linux installations. It does a good job of
> detecting the file type and (if text) character encoding.
> It isn't perfect (nothing can be in this regard), but its
> the best I've found.
Yes, i'm often astonished _how_ good file actually is. BTW, there's a
library that tries to provide the services of 'file' to applications, here's
the blurp from the 'file' sources:
The major feature of 4.x is the refactoring of the code into a library,
and the re-write of the file command in terms of that library. The library
itself, libmagic can be used by 3rd party programs that wish to identify
file types without having to fork() and exec() file. The prime contributor
for 4.0 was M\xe5ns Rullg\xe5rd.
Caveat programmer: there's an advertising clause in the licence (not that
i care, but iff you use this stuff in proprietary code you better check with
your legal department ;-)
HTH Ralf Mattes
> --David
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
More information about the LUG
mailing list