NetBSD/usr.bin/file
mycroft 8f7f9de18d Add support for QMAGIC. 1993-04-16 13:44:34 +00:00
..
magdir Add support for QMAGIC. 1993-04-16 13:44:34 +00:00
tst initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
LEGAL.NOTICE initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
Makefile initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
Makefile.ian initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
PORTING initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
README initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
apprentice.c initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
ascmagic.c initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
file.1 after 0.2.2 "stable" patches applied 1993-03-21 18:04:42 +00:00
file.c initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
file.h initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
fsmagic.c initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
is_tar.c initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
magic Add support for QMAGIC. 1993-04-16 13:44:34 +00:00
magic.5 after 0.2.2 "stable" patches applied 1993-03-21 18:04:42 +00:00
names.h initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
print.c initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
softmagic.c initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00
tar.h initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00

README

** README for file(1) Command **
@(#) $Header: /cvsroot/src/usr.bin/file/Attic/README,v 1.1.1.1 1993/03/21 09:45:37 cgd Exp $

This is Ian Darwin's (copyright but distributable) file(1)
command. It follows the USG (Sys V) model of the file command,
rather than the Research (V7) version or the V7-derived Berkeley
one. That is, there is a file (/etc/magic) that contains much
of the ritual information that is the source of this program's
power. It knows a little more magic (including tar archives)
than System V; the /etc/magic parsing seems to be compatible
with the (poorly documented) System V /etc/magic format (with
one exception; see the man page).

In addition, the /etc/magic file is built from a subdirectory
for easier maintenance.  I will act as a clearinghouse for
magic numbers assigned to all sorts of data files that
are in reasonable circulation. Send your magic numbers,
in magic(4) format please, to the author, Ian Darwin,
{utzoo|ihnp4}!darwin!ian, ian@sq.com. 

LEGAL.NOTICE - read this first.
README - read this second (you are currently reading this file).
PORTING - read this only if the program won't compile.
Makefile - read this next, adapt it as needed (particularly
	the location of the old existing file command and
	the man page layouts), type "make" to compile, 
	"make try" to try it out against your old version.
	Expect some diffs, particularly since your original
	file(1) may not grok the imbedded-space ("\ ") in
	the current magic file, or may even not use the
	magic file.
apprentice.c - parses /etc/magic to learn magic
ascmagic.c - third & last set of tests, based on hardwired assumptions.
core - not included in distribution due to mailer limitations.
debug.c - includes -c printout routine
file.1 - man page for the command
magic.4 - man page for the magic file, courtesy Guy Harris.
	Install as magic.4 on USG and magic.5 on V7 or Berkeley; cf Makefile.
file.c - main program
file.h - header file
fsmagic.c - first set of tests the program runs, based on filesystem info
is_tar.c - knows about tarchives (courtesy John Gilmore).
magdir - directory of /etc/magic pieces
names.h - header file for ascmagic.c
softmagic.c - 2nd set of tests, based on /etc/magic
strtok.c, getopt.c - in case you them (courtesy of Henry Spencer).
strtol.c, strchr.c - in case you need them - public domain.
tst - simple test suite, built from tst/Makefile