Re: I found your name in Linux's /usr/lib/magic

Christos Zoulas (christos@deshaw.com)
Sat, 19 Oct 1996 16:38:05 -0400

On Oct 19, 4:11pm, esr@snark.thyrsus.com ("Eric S. Raymond") wrote:
-- Subject: Re: I found your name in Linux's /usr/lib/magic

| The reason I'm asking is because somebody on the W3C HTML development list
| suggested that it might be a good idea if there were a public Internet
| registry of magic numbers, given as-official-as-it-get status by an RFC which
| software developers could quote.
|
| This stimulated some thoughts in my head:
|
| (1) This sounds like a worthy service project.
|
| (2) I would be willing to do it. After a couple years of maintaining
| terminfo/termcap, I'm pretty comfortable with both the technicalia
| and politics involved in efforts like this.
|
| (3) It might also be useful for there to be a File Extensions Registry,
| and for file(1) to start trying to deduce stuff from file extensions
| when the magic number deductions are ambiguous or nonexistent.
|
| (4) It would be an interesting design challenge to extend the magic-file
| language to declare hints or deductions from filename patterns.

All the extensions must be done in an upwards compatible way.

| As an example of the kind of thing I mean, I can imagine a future version
| of file(1) which, upon seeing a file named `foo.l' would declare it
| a "Lisp source code file" if the initial segment of the file matched
| the regexp [ \t\n]*;* or [ \t\n]*(, but a "Lex source file" if the initial
| segment matched [ \t\n]*/\* or [ \t\n]*%%.
|
| Are these thoughts interesting to you two?

Yes, this sounds interesting to me.

christos