Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.unix.questions Subject: Re: Detecting type of file in a program Message-ID: <2104@buengc.BU.EDU> Date: 10 Feb 89 23:14:36 GMT References: <192@henry.ece.utexas.edu> <9587@smoke.BRL.MIL> <949@auspex.UUCP> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.unix.questions Organization: Boston Univ. Col. of Eng. Lines: 21 In article <949@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes: > >Note, of course, that: > > 1) the set of known magic numbers is not "constant" in any > sense, so you have to pick a set and hope it's sufficient (or > let "file" do it, if your system supports an S5-style "file", > and make sure the "/etc/magic" file is up-to-date and > complete); Hokay, mah innorance is REALLY gonna show, now. At least this is c.u.q and not c.u.w... Just what are magic numbers for and of what significance is the /etc/magic file. Every once in a while I get an error saying something about bad magic numbers or whatnot, and I usually just punt. What's the scoop? --Blair "Amaze your friends and coworkers: alias Presto-chango 'mv -f * /bit/bucket'"