Annotation of src/usr.bin/file/README, Revision 1.3
1.3 ! ian 1: @(#) $OpenBSD: README,v 1.2 1996/06/26 05:32:53 deraadt Exp $
1.1 deraadt 2: ** README for file(1) Command **
3:
1.3 ! ian 4: This is Release 4.x of Ian Darwin's (copyright but distributable)
! 5: file(1) command. This version is the standard "file" command for Linux,
! 6: *BSD, and other systems. (See "patchlevel.h" for the exact release number).
! 7:
! 8: The major feature of 4.x is the refactoring of the code into a library,
! 9: and the re-write of the file command in terms of that library. The library
! 10: itself, libmagic can be used by 3rd party programs that wish to identify
! 11: file types without having to fork() and exec() file. The prime contributor
! 12: for 4.0 was M\xe5ns Rullg\xe5rd.
1.1 deraadt 13:
14: UNIX is a trademark of UNIX System Laboratories.
15:
16: The prime contributor to Release 3.8 was Guy Harris, who put in megachanges
1.3 ! ian 17: including byte-order independence.
1.1 deraadt 18:
19: The prime contributor to Release 3.0 was Christos Zoulas, who put
20: in hundreds of lines of source code changes, including his own
21: ANSIfication of the code (I liked my own ANSIfication better, but
22: his (__P()) is the "Berkeley standard" way of doing it, and I wanted UCB
23: to include the code...), his HP-like "indirection" (a feature of
24: the HP file command, I think), and his mods that finally got the
25: uncompress (-z) mode finished and working.
26:
27: This release has compiled in numerous environments; see PORTING
28: for a list and problems.
29:
30: This fine freeware file(1) follows the USG (System V) model of the file
31: command, rather than the Research (V7) version or the V7-derived 4.[23]
32: Berkeley one. That is, the file /etc/magic contains much of the ritual
33: information that is the source of this program's power. My version
34: knows a little more magic (including tar archives) than System V; the
35: /etc/magic parsing seems to be compatible with the (poorly documented)
36: System V /etc/magic format (with one exception; see the man page).
37:
38: In addition, the /etc/magic file is built from a subdirectory
39: for easier(?) maintenance. I will act as a clearinghouse for
40: magic numbers assigned to all sorts of data files that
41: are in reasonable circulation. Send your magic numbers,
1.3 ! ian 42: in magic(5) format please, to the maintainer, Christos Zoulas.
1.1 deraadt 43:
44: LEGAL.NOTICE - read this first.
45: README - read this second (you are currently reading this file).
46: PORTING - read this only if the program won't compile.
47: Makefile - read this next, adapt it as needed (particularly
48: the location of the old existing file command and
49: the man page layouts), type "make" to compile,
50: "make try" to try it out against your old version.
51: Expect some diffs, particularly since your original
1.3 ! ian 52: file(1) may not grok the embedded-space ("\ ") in
1.1 deraadt 53: the current magic file, or may even not use the
54: magic file.
55: apprentice.c - parses /etc/magic to learn magic
56: ascmagic.c - third & last set of tests, based on hardwired assumptions.
57: core - not included in distribution due to mailer limitations.
58: debug.c - includes -c printout routine
59: file.1 - man page for the command
60: magic.4 - man page for the magic file, courtesy Guy Harris.
61: Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile.
62: file.c - main program
63: file.h - header file
64: fsmagic.c - first set of tests the program runs, based on filesystem info
1.3 ! ian 65: is_tar.c, tar.h - knows about tarchives (courtesy John Gilmore).
1.1 deraadt 66: magdir - directory of /etc/magic pieces
67: magdir/Makefile - ADJUST THIS FOR YOUR CONFIGURATION
68: names.h - header file for ascmagic.c
69: softmagic.c - 2nd set of tests, based on /etc/magic
1.3 ! ian 70: readelf.[ch] - Stand-alone elf parsing code.
! 71: compress.c - on-the-fly decompression.
! 72: print.c - print results, errors, warnings.
! 73:
! 74: If your gzip sometimes fails to decompress things complaining about a short
! 75: file, apply this patch [which is going to be in the next version of gzip]:
! 76: *** - Tue Oct 29 02:06:35 1996
! 77: --- util.c Sun Jul 21 21:51:38 1996
! 78: *** 106,111 ****
! 79: --- 108,114 ----
! 80:
! 81: if (insize == 0) {
! 82: if (eof_ok) return EOF;
! 83: + flush_window();
! 84: read_error();
! 85: }
! 86: bytes_in += (ulg)insize;
1.1 deraadt 87:
1.3 ! ian 88: E-mail: christos@astron.com
1.1 deraadt 89:
1.3 ! ian 90: Phone: Do not even think of telephoning me about this program. Send cash first!
1.1 deraadt 91:
1.3 ! ian 92: Parts of this software were developed at the University of Toronto Computing Services
! 93: and at SoftQuad Inc., developers of SGML/HTML/XML publishing software, in Toronto, Canada.
! 94: SoftQuad was swallowed up by Corel in 2002 and does not exist any longer.
1.1 deraadt 95:
1.3 ! ian 96: Kees Zeelenberg reports that an MS-Windows (Win32) port of file(1)
! 97: is available from http://gnuwin32.sourceforge.net/