mirror of
https://github.com/file/file.git
synced 2024-12-02 22:43:54 +08:00
src | ||
LEGAL.NOTICE | ||
README |
** ALPHA TEST RELEASE ** You are getting this ahead of the rest of the world because you need it or because I like you or something. Please do not forward it to anybody yet. The "official" version will appear in mod.sources at a theater or USENET site near you in time for the Christmas rush. ** File(1) Command ** This is Ian Darwin's (copyright but distributable unmodified) file(1) command. It follows the USG (Sys V) model of the file command, rather than the Research (V7) version. 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. In addition, the /etc/magic file is built from a subdirectory for easier maintenance. At the instigation of John Gilmore, I will act as a clearinghouse for magic numbers assigned to all sorts of whacko data files that are in reasonable circulation. Send your whacko magic numbers, in file(5) format please(!), to the address above. LEGAL.NOTICE - read this first. README - read this second. Makefile - read this third. TODO - read this last (sigh). apprentice.c - parses /etc/magic to learn magic ascmagic.c - third & last set of tests, based on hardwired assumptions. core - not included in distribution debug.c - includes -c printout routine file.1 - man page file.c - main program file.h - fairly standard header file fsmagic.c - first set of tests the program runs, based on filesystem info is_tar.c - knows about tarchives (courtesy of Fred Blonder, U Maryland) magdir - directory of /etc/magic pieces names.h - header file for ascmagic.c softmagic.c - 2nd set of tests, based on /etc/magic strtol.c - in case you need it strtol.tst.c - in case you need to test it