Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!cbosgd!gatech!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.unix-wizards Subject: Re: magic numbers? (teach me, please) Message-ID: <125@brl-tgr.ARPA> Date: Wed, 27-Nov-85 12:31:16 EST Article-I.D.: brl-tgr.125 Posted: Wed Nov 27 12:31:16 1985 Date-Received: Fri, 29-Nov-85 08:00:44 EST References: <124@rexago1.UUCP> <416@ihdev.UUCP> Distribution: net Organization: Ballistic Research Lab Lines: 10 There is no central authority who issues "official" magic numbers for UNIX. System V keeps a list in /etc/magic (perhaps /usr/lib/magic or /usr/5lib/magic, depending on your system) and the "file" command uses this (along with some heuristic tests) to identify types of files. a.out types are hard-wired into the kernel (they're usually described in /usr/include/a.out.h). The same type of a.out is supposed to have the same magic number across UNIX implementations, but this scheme has broken down over the years and it is likely that different CPUs and even different UNIX vendors use different numbers for the same type.