RE: [Exim] [FPPA] [FFPA-Announce] Beta Testers wanted...

Inizio della pagina
Delete this message
Reply to this message
Autore: Michael Haardt
Data:  
To: exim-users
Oggetto: RE: [Exim] [FPPA] [FFPA-Announce] Beta Testers wanted...
> I suspect that you will find that the magic file stuff varies greatly from
> platform to platform and may not be consistent.


That's history: In the beginning, file(1) was just some C code that used
stat(2) as well as some hardcoded magic numbers for a.out, dump, tar,
ar and some other formats. If used on anything else, it said "data"
if characters with set eight bit were found and "ASCII text" else.
Most people didn't like that.

Then, if I remember correctly, SYSV used the magic(4/5) file. Various
implementors made their additions, which explains the variety you see.

Since a long time, there is a portable and free implementation:

ftp://ftp.astron.com/pub/file/

It is a great program and it comes with a really huge magic file. The
author was very responsive when I sent him patches long time ago and it
looks like there are still updates from time to time. The program
is structured as a libmagic.a with a small front end, so applications
can use magic number detection easily. This is the program you will
very likely find on Linux systems.

Michael