At 07:50 PM 12/16/2011, Toby Thain wrote:
(I am aware of 'file', but that doesn't, to
me, do what you're suggesting.)
Most of the magic and usefulness of 'file' is due to the fact that many
commonly used files were in standard formats and did contain fixed magic
identifying bytes in their headers. It's metadata inside the file.
Extensions put the metadata in the filename, and look at all the tools
that assume filename extensions are standard (.sh, .c, .h, .m, .o).
- John