file-inst.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. <sect2>
  2. <title>Installation of File</title>
  3. <para>Note that the sed used in this installation only works if the line
  4. break is placed exactly where it below. Don't try and put it
  5. all on one line otherwise it won't work.</para>
  6. <para>Install File by running the following commands:</para>
  7. <para><screen><userinput>cp readelf.h readelf.h.backup &amp;&amp;</userinput>
  8. <userinput>sed '/#define __/a \</userinput>
  9. <userinput>&nbsp;&nbsp;&nbsp;#include &lt;stdint.h&gt;' readelf.h.backup &gt; readelf.h &amp;&amp;</userinput>
  10. <userinput>./configure --prefix=/usr --datadir=/usr/share/misc &amp;&amp;</userinput>
  11. <userinput>make &amp;&amp;</userinput>
  12. <userinput>make install</userinput></screen></para>
  13. <para>File uses magic numbers to determine a file type. These magic numbers
  14. come with File in a plain text file. File internally compiles this database
  15. each time it is run. This is not the normal type of operation for File since
  16. compiling a
  17. plain text file each time is not the fastest way to do it. File offers an
  18. option "-C" to compile this magic number file. The reason this isn't done
  19. automatically is that some people like to work on the magic numbers. On the
  20. other hand many people didn't get it that they should compile the magic
  21. numbers, so the author of File added a warning when the plain text magic file
  22. is used. As we usually won't work on the plain text magic file, we
  23. compile this file, because it's faster, fixes that annoying warning and is how
  24. it was meant to be:</para>
  25. <para><screen><userinput>file -C</userinput></screen></para>
  26. </sect2>