]> git.saurik.com Git - apple/file_cmds.git/blame - file/README
file_cmds-60.tar.gz
[apple/file_cmds.git] / file / README
CommitLineData
440bd198
A
1$NetBSD: README,v 1.6 1998/09/20 15:27:15 christos Exp $
2** README for file(1) Command **
3@(#) Id: README,v 1.22 1997/11/05 16:03:18 christos Exp
4
5This is Release 3.x of Ian Darwin's (copyright but distributable)
6file(1) command. This version is the standard "file" command for Linux,
7*BSD, and other systems. (See "patchlevel.h" for the exact release number).
8
9UNIX is a trademark of UNIX System Laboratories.
10
11The prime contributor to Release 3.8 was Guy Harris, who put in megachanges
12including byte-order independance.
13
14The prime contributor to Release 3.0 was Christos Zoulas, who put
15in hundreds of lines of source code changes, including his own
16ANSIfication of the code (I liked my own ANSIfication better, but
17his (__P()) is the "Berkeley standard" way of doing it, and I wanted UCB
18to include the code...), his HP-like "indirection" (a feature of
19the HP file command, I think), and his mods that finally got the
20uncompress (-z) mode finished and working.
21
22This release has compiled in numerous environments; see PORTING
23for a list and problems.
24
25This fine freeware file(1) follows the USG (System V) model of the file
26command, rather than the Research (V7) version or the V7-derived 4.[23]
27Berkeley one. That is, the file /etc/magic contains much of the ritual
28information that is the source of this program's power. My version
29knows a little more magic (including tar archives) than System V; the
30/etc/magic parsing seems to be compatible with the (poorly documented)
31System V /etc/magic format (with one exception; see the man page).
32
33In addition, the /etc/magic file is built from a subdirectory
34for easier(?) maintenance. I will act as a clearinghouse for
35magic numbers assigned to all sorts of data files that
36are in reasonable circulation. Send your magic numbers,
37in magic(4) format please, to the maintainer, Christos Zoulas.
38
39LEGAL.NOTICE - read this first.
40README - read this second (you are currently reading this file).
41PORTING - read this only if the program won't compile.
42Makefile - read this next, adapt it as needed (particularly
43 the location of the old existing file command and
44 the man page layouts), type "make" to compile,
45 "make try" to try it out against your old version.
46 Expect some diffs, particularly since your original
47 file(1) may not grok the imbedded-space ("\ ") in
48 the current magic file, or may even not use the
49 magic file.
50apprentice.c - parses /etc/magic to learn magic
51ascmagic.c - third & last set of tests, based on hardwired assumptions.
52core - not included in distribution due to mailer limitations.
53debug.c - includes -c printout routine
54file.1 - man page for the command
55magic.4 - man page for the magic file, courtesy Guy Harris.
56 Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile.
57file.c - main program
58file.h - header file
59fsmagic.c - first set of tests the program runs, based on filesystem info
60is_tar.c, tar.h - knows about tarchives (courtesy John Gilmore).
61magdir - directory of /etc/magic pieces
62 magdir/Makefile - ADJUST THIS FOR YOUR CONFIGURATION
63names.h - header file for ascmagic.c
64softmagic.c - 2nd set of tests, based on /etc/magic
65readelf.[ch] - Standalone elf parsing code.
66compress.c - on-the-fly decompression.
67internat.c - recognize international `text' files.
68print.c - print results, errors, warnings.
69
70If your gzip sometimes fails to decompress things complaining about a short
71file, apply this patch [which is going to be in the next version of gzip]:
72*** - Tue Oct 29 02:06:35 1996
73--- util.c Sun Jul 21 21:51:38 1996
74*** 106,111 ****
75--- 108,114 ----
76
77 if (insize == 0) {
78 if (eof_ok) return EOF;
79+ flush_window();
80 read_error();
81 }
82 bytes_in += (ulg)insize;
83
84E-mail: christos@astron.com, moraes@deshaw.com
85
86Phone: Do not even think of telephoning me about this program. Send cash first!
87
88Parts of this software were developed at SoftQuad Inc., 56 Aberfoyle
89Cres, # 810, Toronto, Ontario CANADA M8X 2W4. Phone: 416-239-4801 or
90800-387-2777. Email: mail@sq.com. Call for information on SGML editing
91and browsing, Unix text processing, and customised products on Unix,
92DOS and Mac.