NetBSD/usr.bin/file/README

49 lines
2.3 KiB
Plaintext
Raw Normal View History

1993-03-21 12:45:37 +03:00
** 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