1** README for file(1) Command **
2@(#) $Id: s.README 1.2 03/05/09 01:23:24-07:00 orc@downbelow.pell.portland.or.us $
3
4This is Release 3.x of Ian Darwin's (copyright but distributable)
5file(1) command.  Release 3.x is scheduled for inclusion in the
64.4 BSD (Berkeley Software Distribution) of UNIX-like
7software, and is the standard "file" command for Linux, 386bsd,
8and other systems. (See "patchlevel.h" for the exact release number).
9
10UNIX is a trademark of UNIX System Laboratories.
11
12The prime contributor to Release 3.8 was Guy Harris, who put in megachanges
13including byte-order independance.
14
15The prime contributor to Release 3.0 was Christos Zoulas, who put
16in hundreds of lines of source code changes, including his own
17ANSIfication of the code (I liked my own ANSIfication better, but
18his (__P()) is the "Berkeley standard" way of doing it, and I wanted UCB
19to include the code...), his HP-like "indirection" (a feature of
20the HP file command, I think), and his mods that finally got the
21uncompress (-z) mode finished and working.
22
23This release has compiled in numerous environments; see PORTING
24for a list and problems.
25
26This fine freeware file(1) follows the USG (System V) model of the file
27command, rather than the Research (V7) version or the V7-derived 4.[23]
28Berkeley one. That is, the file /etc/magic contains much of the ritual
29information that is the source of this program's power. My version
30knows a little more magic (including tar archives) than System V; the
31/etc/magic parsing seems to be compatible with the (poorly documented)
32System V /etc/magic format (with one exception; see the man page).
33
34In addition, the /etc/magic file is built from a subdirectory
35for easier(?) maintenance.  I will act as a clearinghouse for
36magic numbers assigned to all sorts of data files that
37are in reasonable circulation. Send your magic numbers,
38in magic(4) format please, to the maintainer, Christos Zoulas.
39
40LEGAL.NOTICE - read this first.
41README - read this second (you are currently reading this file).
42PORTING - read this only if the program won't compile.
43Makefile - read this next, adapt it as needed (particularly
44	the location of the old existing file command and
45	the man page layouts), type "make" to compile,
46	"make try" to try it out against your old version.
47	Expect some diffs, particularly since your original
48	file(1) may not grok the imbedded-space ("\ ") in
49	the current magic file, or may even not use the
50	magic file.
51apprentice.c - parses /etc/magic to learn magic
52ascmagic.c - third & last set of tests, based on hardwired assumptions.
53core - not included in distribution due to mailer limitations.
54debug.c - includes -c printout routine
55file.1 - man page for the command
56magic.4 - man page for the magic file, courtesy Guy Harris.
57	Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile.
58file.c - main program
59magic.h - header file
60fsmagic.c - first set of tests the program runs, based on filesystem info
61is_tar.c - knows about tarchives (courtesy John Gilmore).
62magdir - directory of /etc/magic pieces
63	magdir/Makefile - ADJUST THIS FOR YOUR CONFIGURATION
64names.h - header file for ascmagic.c
65softmagic.c - 2nd set of tests, based on /etc/magic
66strtok.c, getopt.c - in case you them (courtesy of Henry Spencer).
67strtol.c, strchr.c - in case you need them - public domain.
68tst - simple test suite, built from tst/Makefile
69
70
71E-mail: christos@deshaw.com, moraes@deshaw.com
72
73Phone: Do not even think of telephoning me about this program. Send cash first!
74
75Parts of this software were developed at SoftQuad Inc., 56 Aberfoyle
76Cres, # 810, Toronto, Ontario CANADA M8X 2W4.  Phone: 416-239-4801 or
77800-387-2777. Email: mail@sq.com.  Call for information on SGML editing
78and browsing, Unix text processing, and customised products on Unix,
79DOS and Mac.
80