README 4.0 KB

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